summaryrefslogtreecommitdiffstats
path: root/upstream/mageia-cauldron/man1/builtins.1
blob: 00dc28b0b011724660e19a88d8e85b0a1c0bd63f (plain)
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
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
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
.lf 1 ./builtins.1
.\" 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 "2021 November 22" "GNU Bash 5.2"
.SH NAME
:, ., [, 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,
readarray, 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
.lf 1 ./bash.1
.\"
.\" MAN PAGE COMMENTS to
.\"
.\"	Chet Ramey
.\"	Case Western Reserve University
.\"	chet.ramey@case.edu
.\"
.\"	Last Change: Mon Sep 19 11:13:21 EDT 2022
.\"
.\" bash_builtins, strip all but Built-Ins section
.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 ,
but \fIfilename\fP does not need to be executable.
The file searched for in
.SM
.B PATH
need not be executable.
When \fBbash\fP is not in \fIposix mode\fP, it searches
the current directory 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, \fB.\fP inherits any trap on
\fBDEBUG\fP; if it is not, any \fBDEBUG\fP trap string is saved and
restored around the call to \fB.\fP, and \fB.\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 \fB.\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
.TP
\fBbind\fP \fIreadline-command-line\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 a
.B readline
initialization file such as
.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.
The shell assigns any numeric argument the user supplied to the     
.SM
.B READLINE_ARGUMENT
variable.
If there was no argument, that variable is not set.
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.
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.
If the directory change is successful, \fBcd\fP sets the value of the
\fBPWD\fP environment variable to the new directory name, and sets the
\fBOLDPWD\fP environment variable to the value of the current working
directory before the change.
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
.ie \n(zZ=1 in \fIbash(1)\fP.
.el 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.
Arguments are passed as with the \fB\-F\fP option.
.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
.ie \n(zZ=1 in \fIbash(1)\fP).
.el above).
.TP
.B \-A
Each \fIname\fP is an associative array variable (see
.B Arrays
.ie \n(zZ=1 in \fIbash(1)\fP).
.el 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"
.ie \n(zZ=1 in \fIbash(1)\fP)
.el 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
.ie \n(zZ=1 in \fIbash(1)\fP),
.el 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.
Bash will use the value of the \fBBASH_LOADABLES_PATH\fP variable as a
colon-separated list of directories in which to search for \fIfilename\fP.
The default is system-dependent.
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.
If no options are supplied and a \fIname\fP is not a shell builtin,
\fBenable\fP will attempt to load \fIname\fP from a shared object named
\fIname\fP, as if the command were
.if t \f(CWenable \-f\fP \fIname name\fP .
.if n ``enable -f \fIname name\fP .
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 range of 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 or range 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"
.ie \n(zZ=1 in \fIbash(1)\fP).
.el 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.
The elements are numbered from 0 starting at the first directory
listed by \fBdirs\fP.
With no arguments, \fBpopd\fP
removes the top directory from the stack, and
changes 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, from the stack.
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 top element of the directory stack is modified, and
the \fI-n\fP option was not supplied, \fBpopd\fP uses the \fBcd\fP
builtin to change to the directory at the top of the stack.
If the \fBcd\fP fails, \fBpopd\fP returns a non-zero value.
.PP
Otherwise,
.B popd
returns false if an invalid option is encountered, the directory stack
is empty, or a non-existent directory stack entry is specified.
.PP
If the
.B popd
command is successful,
bash runs
.B dirs
to show the final contents of the directory stack,
and the return status is 0.
.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 %Q
like \fB%q\fP, but applies any supplied precision to the \fIargument\fP
before quoting it.
.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 elements of
the directory stack.
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
.PD
.PP
After the stack has been modified, if the \fB\-n\fP option was not
supplied, \fBpushd\fP uses the \fBcd\fP builtin to change to the
directory at the top of the stack.
If the \fBcd\fP fails, \fBpushd\fP returns a non-zero value.
.PP
Otherwise, if no arguments are supplied,
.B pushd
returns 0 unless the directory stack is empty.
When rotating the directory stack,
.B pushd
returns 0 unless the directory stack is empty or
a non-existent directory stack element is specified.
.PP
If the
.B pushd
command is successful,
bash runs
.B dirs
to show the final contents of the directory stack.
.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
.ie \n(zZ=1 in \fIbash(1)\fP
.el 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
.ie \n(zZ=1 in \fIbash(1)\fP
.el 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
.ie \n(zZ=1 in \fIbash(1)\fP)
.el 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,
or the read will return EOF,
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] [\fB\-\-\fP] [\fB\-\fP] [\fIarg\fP ...]
.PD 0
.TP
\fBset\fP [\fB+abefhkmnptuvxBCEHPT\fP] [\fB+o\fP \fIoption\-name\fP] [\fB\-\-\fP] [\fB\-\fP] [\fIarg\fP ...]
.PD
Without options, display the name and value of each shell variable
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
.ie \n(zZ=1 in \fIbash(1)\fP),
.el 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"
.ie \n(zZ=1 in \fIbash(1)\fP),
.el 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
.ie \n(zZ=1 in \fIbash(1)\fP).
.el 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
.ie \n(zZ=1 in \fIbash(1)\fP
.el 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
.ie \n(zZ=1 in \fIbash(1)\fP).
.el 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"
.ie \n(zZ=1 in \fIbash(1)\fP
.el 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 \-r
Enable restricted shell mode.
This option cannot be unset once it has been set.
.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 "*",
or array variables subscripted with "@" or "*",
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
.ie \n(zZ=1 in \fIbash(1)\fP).
.el 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"
.ie \n(zZ=1 in \fIbash(1)\fP).
.el 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
.ie \n(zZ=1 in \fIbash(1)\fP
.el 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
.TP 8
.B compat50
.PD
These control aspects of the shell's compatibility mode
(see
.SM
.B "SHELL COMPATIBILITY MODE"
.ie \n(zZ=1 in \fIbash(1)\fP).
.el 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
.ie \n(zZ=1 in \fIbash(1)\fP
.el 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
.ie \n(zZ=1 in \fIbash(1)\fP).
.el 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
.ie \n(zZ=1 in \fIbash(1)\fP
.el 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
.ie \n(zZ=1 in \fIbash(1)\fP
.el 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
.ie \n(zZ=1 in \fIbash(1)\fP)
.el 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 globskipdots
If set, pathname expansion will never match the filenames
.B ``.''
and
.BR ``..'' ,
even if the pattern begins with a
.BR ``.'' .
This option is enabled by default.
.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
.ie \n(zZ=1 in \fIbash(1)\fP).
.el 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
.ie \n(zZ=1 in \fIbash(1)\fP).
.el 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"
.ie \n(zZ=1 in \fIbash(1)\fP).
.el 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
.ie \n(zZ=1 in \fIbash(1)\fP).
.el 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 noexpand_translation
If set,
.B bash
encloses the translated results of $"..." quoting in single quotes
instead of double quotes.
If the string is not translated, this has no effect.
.TP 8
.B nullglob
If set,
.B bash
allows patterns which match no
files (see
.B Pathname Expansion
.ie \n(zZ=1 in \fIbash(1)\fP)
.el above)
to expand to a null string, rather than themselves.
.TP 8
.B patsub_replacement
If set, \fBbash\fP
expands occurrences of \fB&\fP in the replacement string of pattern
substitution to the text matched by the pattern, as described
under \fBParameter Expansion\fP
.ie \n(zZ=1 in \fIbash(1)\fP.
.el above.
This option is enabled by default.
.TP 8
.B progcomp
If set, the programmable completion facilities (see
\fBProgrammable Completion\fP
.ie \n(zZ=1 in \fIbash(1)\fP)
.el 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
.ie \n(zZ=1 in \fIbash(1)\fP.
.el 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"
.ie \n(zZ=1 in \fIbash(1)\fP).
.el 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
\fB.\fP (\fBsource\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 varredir_close
If set, the shell automatically closes file descriptors assigned using the
\fI{varname}\fP redirection syntax (see
.SM
.B REDIRECTION
.ie \n(zZ=1 in \fIbash(1)\fP)
.el above)
instead of leaving them open when the command completes.
.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,
or a shell without job control enabled,
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
or job control is not enabled
and
.B \-f
is not supplied.
.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.
Expressions are composed of the primaries described 
.ie \n(zZ=1 in \fIbash(1)\fP
.el above
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
.ie \n(zZ=1 in \fIbash(1)\fP
.el 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
.ie \n(zZ=1 in \fIbash(1)\fP
.el 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
The following conditions are applied in the order listed.
If the first argument is \fB!\fP, the result is the negation of
the three-argument expression composed of the remaining arguments.
the two-argument test using the second and third arguments.
If the first argument is exactly \fB(\fP and the fourth argument is
exactly \fB)\fP, the result is the two-argument test of the second
and third 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
.ie \n(zZ=1 in \fIbash(1)\fP).
.el 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 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
.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.
.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 or may not be unset.
.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.
If \fBwait\fP is interrupted by a signal, the return status will be greater
than 128, as described under
.B SIGNALS
.ie \n(zZ=1 in \fIbash(1)\fP.
.el above.
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 \fIshell compatibility level\fP,
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 subsequent versions). 
.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
(e.g., declare -a foo=\(aq(1 2)\(aq). 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
.TP
\fBcompat51\fP
.PD 0
.RS
.IP \(bu
The \fBunset\fP builtin treats attempts to unset array subscripts \fB@\fP
and \fB*\fP differently depending on whether the array is indexed or
associative, and differently than in previous versions.
.RE
.PD
.\" bash_builtins
.zY
.lf 23 ./builtins.1
.SH SEE ALSO
bash(1), sh(1)