Knowledge

Standard streams

Source 📝

103: 146:, programs had to explicitly connect to the appropriate input and output devices. OS-specific intricacies caused this to be a tedious programming task. On many systems it was necessary to obtain control of environment settings, access a local file table, determine the intended data set, and handle hardware correctly in the case of a 121:
Streams may be used to chain applications, meaning that the output stream of one program can be redirected to be the input stream to another application. In many operating systems this is expressed by listing the application names, separated by the vertical bar character, for this reason often called
180:
Another Unix breakthrough was to automatically associate input and output to terminal keyboard and terminal display, respectively, by default — the program (and programmer) did absolutely nothing to establish input and output for a typical input-process-output program (unless it chose a different
422:
is involved. For example, in common situations the standard error stream is unbuffered but the standard output stream is line-buffered; in this case, text written to standard error later may appear on the terminal earlier, if the standard output stream buffer is not yet full.
2166:
Some GUI programs, primarily on Unix, still write debug information to standard error. Others (such as many Unix media players) may read files from standard input. Popular Windows programs that open a separate console window in addition to their GUI windows are the emulators
766:# ALGOL 68 example # main:( REAL number; getf(stand in,($ g$ ,number)); printf(($ "Number is: "g(6,4)"OR "$ ,number)); # OR # putf(stand out,($ " Number is: "g(6,4)"!"$ ,number)); newline(stand out) ) 110:
Users generally know standard streams as input and output channels that handle data coming from an input device, or that write data from the application. The data may be text with any encoding, or
169:, which removed the need for a program to know or care what kind of devices it was communicating with. Older operating systems forced upon the programmer a record structure and frequently 407:
is redirected to input of the next program or a text file, but errors from each program still go directly to the text terminal so they can be reviewed by the user in real time.
1182:(stdout, stderr) objects, which only allow access to the underlying standard streams on a text basis. Full binary access to the standard streams must be performed through the 2159:, is also analogous to standard streams. On these operating systems, graphical applications can provide functionality through a system-wide menu that operates on the current 491:
Standard error was added to Unix in the 1970s after several wasted phototypesetting runs ended with error messages being typeset instead of displayed on the user's terminal.
173:
data semantics and device control. Unix eliminated this complexity with the concept of a data stream: an ordered sequence of data bytes which can be read until the
2513: 2503: 2331:", edited by A. van Wijngaarden, B.J. Mailloux, J.E.L. Peck, C.H.A. Koster, M. Sintzoff, C.H. Lindsey, L.G.L.T. Meertens and R.G. Fisker, Section 10.3. 2128:(GUIs) do not always make use of the standard streams; they do when GUIs are wrappers of underlying scripts and/or console programs, for instance the 2168: 233:, standard input is inherited from the parent process. In the case of an interactive shell, that is usually associated with the input device of a 2426: 2136:
project make use of stdin, stdout, and stderr, and are based on simple scripts rather than a complete GUI programmed and compiled in C/C++ using
2307: 2132:
package manager GUI, which wraps apt commands in Debian and/or Ubuntu. GUIs created with scripting tools like Zenity and KDialog by
803:, the standard input, output, and error streams are attached to the existing Unix file descriptors 0, 1 and 2 respectively. In a 1148:(for stderr). Basic read and write capabilities for the stdin and stdout streams are also accessible directly through the class 857:
to accept "-" as representing standard input, which spread to other utilities and became a part of the operating system as a
70:(input via keyboard, output via monitor), but standard streams abstract this. When a command is executed via an interactive 2376: 2328: 418:
to the same destination, such as the text terminal. Messages appear in the same order as the program writes them, unless
899: 893: 887: 206:
Standard input is a stream from which a program reads its input data. The program requests data transfers by use of the
2246: 2527: 193: 299:
Standard output is a stream to which a program writes its output data. The program requests data transfer with the
391:, allowing output and errors to be distinguished, and is analogous to a function returning a pair of values – see 334:, standard output is inherited from the parent process. In the case of an interactive shell, that is usually the 392: 284: 2349: 1129: 177:. A program may also write bytes as desired and need not, and cannot easily declare their count or grouping. 2500: 1840: 2479: 2259: 507:
has the equivalent of Unix file descriptors: By convention, many Fortran implementations use unit numbers
462:, the former being unbuffered and the latter using the same buffering mechanism as all other C++ streams. 882: 223: 2281: 2418: 828: 192:
runtime environment was obliged to support it as well. As a result, most C runtime environments (and
2448: 2303: 2125: 1813: 189: 118:, its standard error stream is redirected into a log file, typically for error analysis purposes. 2393: 2197: 384:
or diagnostics. It is a stream independent of standard output and can be redirected separately.
331: 230: 79: 2483: 2533: 1817: 800: 734: 388: 35: 1843:, shows how to redirect the standard input both to the standard output and to a text file. 288: 242: 182: 27: 185:
to establish connections, or the equivalent burden had to be orchestrated by the program.
8: 2212: 2181:
can use stdin as a communication interface with an interpreted program to realize a GUI.
2129: 151: 181:
paradigm). In contrast, previous operating systems usually required some—often complex—
170: 2299: 2202: 305: 115: 2523: 870: 234: 147: 71: 485:
to be redirected to the same destination that standard output is directed to using
472:
to be redirected to the same destination that standard output is directed to using
134:, providing the user control over the display of the output stream on the display. 106:
The standard streams for input, output, and error in a common default configuration
38:
between a computer program and its environment when it begins execution. The three
2369:
A Research Unix reader: annotated excerpts from the Programmer's Manual, 1971–1986
2507: 2226: 427: 404: 342: 253: 123: 83: 287:. Similar abstractions exist in the standard I/O libraries of practically every 2453: 2367: 1133: 866: 862: 854: 403:
is redirected (so not readily observed). For example, output of a program in a
317: 238: 131: 91: 67: 19:
This article is about standard I/O file descriptors. For System V streams, see
2286:
The Open Group Base Specifications Issue 6—IEEE Std 1003.1, 2004 Edition
2160: 733:'s input and output facilities were collectively referred to as the transput. 2575: 2569: 2148: 2137: 396: 381: 380:
Standard error is another output stream typically used by programs to output
335: 323: 212: 87: 75: 2553: 2559: 2547: 2363: 2207: 858: 846: 465: 399:
which started the program to provide the best chance of being seen even if
159: 39: 849:(designer and implementer of the original Unix operating system) modified 850: 419: 196:), regardless of the operating system, provide equivalent functionality. 174: 111: 2178: 155: 127: 222:
programs (which display file names contained in a directory) may take
311: 102: 2249:, AT&T Bell Laboratories Technical Journal, 68(8), October 1984. 2188:
paradigm "presents" GUI elements sent to an extended output stream.
454:
standard header provides two variables associated with this stream:
2341: 2156: 2152: 810: 730: 719: 210:
operation. Not all programs require stream input. For example, the
2449:"Adding graphic elements to your scripts with Zenity and KDialog" 504: 478: 20: 303:
operation. Not all programs generate output. For example, the
2221: 2172: 226:, but perform their operations without any stream data input. 2217: 1831:
of that class to access the standard streams of the process.
804: 431: 346: 257: 249: 2260:"What are stdin, stdout and stderr in Linux? | CodePre.com" 2185: 143: 1857:# Save the current stdout so that we can revert sys.stdout 2141: 2133: 16:
Connected input and output streams for computer programs
741:
standard. The model included three standard channels:
523:
module was standardized to include the named constants
218: 78:
on which the shell is running, but can be changed with
2497:, Control Data Corporation, Part Number 60436000, 1978 2491:, Control Data Corporation, Part Number 60407000, 1974 2304:"[TUHS] Graphic Systems C/A/T phototypesetter" 1735:"The specified value is not a valid number!" 1437:"The specified value is not a valid number!" 66:). Originally I/O happened via a physically connected 2144:, or other equivalent proprietary widget framework. 2329:
Revised Report on the Algorithmic Language Algol 68
1136:languages, the standard streams are referred to by 865:. Diagnostics were part of standard output through 722:was criticized for having no standard file access. 2100:# Restore sys.stdout to our old saved file handler 165:One of Unix's several groundbreaking advances was 2342:"Stdin(3): Standard I/O streams - Linux man page" 2567: 126:character. A well-known example is the use of a 2501:Level 68 Introduction to Programming on MULTICS 2495:NOS Version 1 Applications Programmer's Instant 1995:") this is to the redirected --->" 188:Since Unix provided standard streams, the Unix 74:, the streams are typically connected to the 2419:".NET Framework 4.7.1, mscorlib, console.cs" 2227:Standard streams in the Files-11 file system 2040:") this is to the actual --->" 1780:"The specified number is too big!" 1485:"The specified number is too big!" 519:for stderr. In Fortran-2003, the intrinsic 275:global variable. Similarly, the global C++ 2534:Console Class, .NET Framework Class Library 2163:in the GUI, no matter in what application. 2019:# Prints to the actual saved stdout handler 1834: 393:Semi-predicate problem: Multi valued return 294: 2375:(Technical report). CSTR. Bell Labs. 139. 885:, the standard streams are referred to by 375: 241:) which is ultimately linked to a user's 201: 101: 2520:Lions' Commentary on UNIX Sixth Edition 2446: 2362: 2298: 873:created the concept of standard error. 787:Number is: +3.142 OR Number is: +3.142! 162:, card punch, or interactive terminal. 2568: 535:to portably specify the unit numbers. 410:It is acceptable and normal to direct 2514:Evolution of the MVS Operating System 2356: 90:inherits the standard streams of its 1968:# Prints to the redirected stdout () 794: 345:for standard output is 1 (one); the 256:for standard input is 0 (zero); the 142:In most operating systems predating 1860:# after we complete our redirection 1648:' If Parse() threw an exception 1192:System.Console.OpenStandardOutput() 827:should be used instead rather than 13: 2562:- by The Linux Information Project 2556:- by The Linux Information Project 2550:- by The Linux Information Project 2382:from the original on Dec 15, 2023. 1839:The following example, written in 1690:"No number was entered!" 1389:"No number was entered!" 1196:System.Console.OpenStandardError() 1188:System.Console.OpenStandardInput() 737:coordinated the definition of the 34:are preconnected input and output 14: 2587: 2541: 2429:from the original on Dec 10, 2017 2352:from the original on Jun 8, 2023. 1893:# Redirect sys.stdout to the file 725: 714: 499: 430:for standard error is defined by 1344:// If Parse() threw an exception 438:header file provides the symbol 271:abstraction is provided via the 2440: 2310:from the original on 2020-09-25 1513:' Visual Basic .NET example 395:. The usual destination is the 2411: 2386: 2334: 2321: 2292: 2274: 2252: 2247:"A Stream Input-Output System" 2239: 1158:System.Console.Out.WriteLine() 1123: 97: 1: 2536:, Microsoft Corporation, 2008 2510:, Honeywell Corporation, 1981 2394:"System (Java Platform SE 7)" 2232: 2186:Common Lisp Interface Manager 1835:2000 - : Python (2 or 3) 1630:"Number is: {0:F3}" 1323:"Number is: {0:F3}" 876: 338:which initiated the program. 137: 114:. When a program is run as a 42:(I/O) connections are called 2423:Reference Source - Microsoft 283:provides an abstraction via 7: 2489:KRONOS 2.1 Reference Manual 2191: 494: 10: 2592: 2554:Standard Output Definition 2471: 2447:Kißling, Kristian (2009). 1811:System.Diagnostics.Process 1154:System.Console.WriteLine() 775: 772: 309:command (variously called 18: 2560:Standard Error Definition 2548:Standard Input Definition 2126:Graphical user interfaces 1816:one can use the instance 763: 1845: 1510: 1200: 905: 764: 619: 537: 327:) is silent on success. 295:Standard output (stdout) 2516:, IBM Corporation, 1981 2288:. The Open Group. 2004. 2198:Redirection (computing) 2120: 1156:can be used instead of 376:Standard error (stderr) 1914:"myfile.txt" 1046:"Number is:" 801:C programming language 622:! Fortran 2003 example 606:' NUMBER IS: ' 442:; the corresponding C 389:semi-predicate problem 356:; the corresponding C 267:; the corresponding C 224:command-line arguments 202:Standard input (stdin) 107: 36:communication channels 1848:#!/usr/bin/env python 1666:ArgumentNullException 1356:ArgumentNullException 700:'Number is: ' 364:; similarly, the C++ 130:application, such as 105: 2151:, as implemented on 1186:objects returned by 1180:System.IO.TextWriter 1176:System.IO.TextReader 1172:System.Console.Error 1146:System.Console.Error 540:! FORTRAN 77 example 481:-style shells allow 468:-style shells allow 289:programming language 183:job control language 86:. More generally, a 28:computer programming 2213:C file input/output 897:(for stdout), and 843:are also provided. 760: 152:magnetic tape drive 2506:2021-02-25 at the 2398:Oracle Help Center 2282:"<unistd.h>" 2203:Stream (computing) 1809:When applying the 1168:System.Console.Out 1142:System.Console.Out 1097:"Error:" 831:. File pointers 756: 108: 2484:The GNU C Library 2262:. 2 December 2021 1756:OverflowException 1452:OverflowException 1164:System.Console.In 1144:(for stdout) and 1138:System.Console.In 962:InputStreamReader 871:Dennis M. Ritchie 795:1970s: C and Unix 792: 791: 279:variable of type 148:punch card reader 2583: 2480:Standard Streams 2465: 2464: 2462: 2461: 2444: 2438: 2437: 2435: 2434: 2415: 2409: 2408: 2406: 2404: 2390: 2384: 2383: 2381: 2374: 2360: 2354: 2353: 2338: 2332: 2325: 2319: 2318: 2316: 2315: 2306:(Mailing list). 2296: 2290: 2289: 2278: 2272: 2271: 2269: 2267: 2256: 2250: 2243: 2116: 2113: 2110: 2107: 2104: 2101: 2098: 2095: 2092: 2089: 2086: 2083: 2080: 2079:# Close the file 2077: 2074: 2071: 2068: 2065: 2062: 2059: 2056: 2053: 2050: 2047: 2044: 2041: 2038: 2035: 2032: 2029: 2026: 2023: 2020: 2017: 2014: 2011: 2008: 2005: 2002: 1999: 1996: 1993: 1990: 1987: 1984: 1981: 1978: 1975: 1972: 1969: 1966: 1963: 1960: 1957: 1954: 1951: 1948: 1945: 1942: 1939: 1936: 1933: 1930: 1927: 1924: 1921: 1918: 1915: 1912: 1909: 1906: 1903: 1900: 1897: 1894: 1891: 1888: 1885: 1882: 1879: 1876: 1873: 1870: 1867: 1864: 1861: 1858: 1855: 1852: 1849: 1830: 1826: 1822: 1812: 1805: 1802: 1799: 1796: 1793: 1790: 1787: 1784: 1781: 1778: 1775: 1772: 1769: 1766: 1763: 1760: 1757: 1754: 1751: 1748: 1745: 1742: 1739: 1736: 1733: 1730: 1727: 1724: 1721: 1718: 1715: 1712: 1709: 1706: 1703: 1700: 1697: 1694: 1691: 1688: 1685: 1682: 1679: 1676: 1673: 1670: 1667: 1664: 1661: 1658: 1655: 1652: 1649: 1646: 1643: 1640: 1637: 1634: 1631: 1628: 1625: 1622: 1619: 1616: 1613: 1610: 1607: 1604: 1601: 1598: 1595: 1592: 1589: 1586: 1583: 1580: 1577: 1574: 1571: 1568: 1565: 1562: 1559: 1556: 1553: 1550: 1547: 1544: 1541: 1538: 1535: 1532: 1529: 1526: 1523: 1520: 1517: 1514: 1507: 1504: 1501: 1498: 1495: 1492: 1489: 1486: 1483: 1480: 1477: 1474: 1471: 1468: 1465: 1462: 1459: 1456: 1453: 1450: 1447: 1444: 1441: 1438: 1435: 1432: 1429: 1426: 1423: 1420: 1417: 1414: 1411: 1408: 1405: 1402: 1399: 1396: 1393: 1390: 1387: 1384: 1381: 1378: 1375: 1372: 1369: 1366: 1363: 1360: 1357: 1354: 1351: 1348: 1345: 1342: 1339: 1336: 1333: 1330: 1327: 1324: 1321: 1318: 1315: 1312: 1309: 1306: 1303: 1300: 1297: 1294: 1291: 1288: 1285: 1282: 1279: 1276: 1273: 1270: 1267: 1264: 1261: 1258: 1255: 1252: 1249: 1246: 1243: 1240: 1237: 1234: 1231: 1228: 1225: 1222: 1219: 1216: 1213: 1210: 1207: 1204: 1197: 1193: 1189: 1185: 1184:System.IO.Stream 1181: 1177: 1173: 1169: 1165: 1159: 1155: 1151: 1147: 1143: 1139: 1119: 1116: 1113: 1110: 1107: 1104: 1101: 1098: 1095: 1092: 1089: 1086: 1083: 1080: 1077: 1074: 1071: 1068: 1065: 1062: 1059: 1056: 1053: 1050: 1047: 1044: 1041: 1038: 1035: 1032: 1029: 1026: 1023: 1020: 1017: 1014: 1011: 1008: 1005: 1002: 999: 996: 993: 990: 987: 984: 981: 978: 975: 972: 969: 966: 963: 960: 957: 954: 951: 948: 945: 942: 939: 936: 933: 930: 927: 924: 921: 918: 915: 912: 909: 902: 896: 890: 807:environment the 761: 755: 752: 748: 744: 710: 707: 704: 701: 698: 695: 694:'(a,i3)' 692: 689: 686: 683: 680: 677: 674: 671: 668: 665: 662: 659: 656: 653: 650: 647: 644: 641: 638: 635: 632: 629: 626: 623: 616: 613: 610: 607: 604: 601: 600:'(A,I3)' 598: 595: 592: 589: 586: 583: 580: 577: 574: 571: 568: 565: 562: 559: 556: 553: 550: 547: 544: 541: 534: 530: 526: 522: 518: 514: 510: 461: 457: 453: 452:<iostream> 449: 445: 441: 436:<unistd.h> 434:as 2 (two); the 387:This solves the 371: 367: 366:<iostream> 363: 359: 355: 351: 350:<unistd.h> 282: 281:<iostream> 278: 274: 270: 266: 262: 261:<unistd.h> 167:abstract devices 32:standard streams 2591: 2590: 2586: 2585: 2584: 2582: 2581: 2580: 2566: 2565: 2544: 2539: 2508:Wayback Machine 2474: 2469: 2468: 2459: 2457: 2445: 2441: 2432: 2430: 2417: 2416: 2412: 2402: 2400: 2392: 2391: 2387: 2379: 2372: 2361: 2357: 2340: 2339: 2335: 2326: 2322: 2313: 2311: 2297: 2293: 2280: 2279: 2275: 2265: 2263: 2258: 2257: 2253: 2245:D. M. Ritchie, 2244: 2240: 2235: 2194: 2123: 2118: 2117: 2114: 2111: 2108: 2105: 2102: 2099: 2096: 2093: 2090: 2087: 2084: 2081: 2078: 2075: 2072: 2069: 2066: 2063: 2060: 2057: 2054: 2051: 2048: 2045: 2042: 2039: 2036: 2033: 2030: 2027: 2024: 2021: 2018: 2015: 2012: 2009: 2006: 2003: 2000: 1997: 1994: 1991: 1988: 1985: 1982: 1979: 1976: 1973: 1970: 1967: 1964: 1961: 1958: 1955: 1952: 1949: 1946: 1943: 1940: 1937: 1934: 1931: 1928: 1925: 1922: 1919: 1916: 1913: 1910: 1907: 1904: 1901: 1898: 1895: 1892: 1889: 1886: 1883: 1880: 1877: 1874: 1871: 1868: 1865: 1862: 1859: 1856: 1853: 1850: 1847: 1837: 1828: 1824: 1820: 1810: 1807: 1806: 1803: 1800: 1797: 1794: 1791: 1788: 1785: 1782: 1779: 1776: 1773: 1770: 1767: 1764: 1761: 1758: 1755: 1752: 1749: 1746: 1743: 1740: 1737: 1734: 1731: 1728: 1725: 1722: 1719: 1716: 1713: 1711:FormatException 1710: 1707: 1704: 1701: 1698: 1695: 1692: 1689: 1686: 1683: 1680: 1677: 1674: 1671: 1668: 1665: 1662: 1659: 1656: 1653: 1650: 1647: 1644: 1641: 1638: 1635: 1632: 1629: 1626: 1623: 1620: 1617: 1614: 1611: 1608: 1605: 1602: 1599: 1596: 1593: 1590: 1587: 1584: 1581: 1578: 1575: 1572: 1569: 1566: 1563: 1560: 1557: 1554: 1551: 1548: 1545: 1542: 1539: 1536: 1533: 1530: 1527: 1524: 1521: 1518: 1515: 1512: 1509: 1508: 1505: 1502: 1499: 1496: 1493: 1490: 1487: 1484: 1481: 1478: 1475: 1472: 1469: 1466: 1463: 1460: 1457: 1454: 1451: 1448: 1445: 1442: 1439: 1436: 1433: 1430: 1427: 1424: 1421: 1418: 1415: 1412: 1409: 1406: 1404:FormatException 1403: 1400: 1397: 1394: 1391: 1388: 1385: 1382: 1379: 1376: 1373: 1370: 1367: 1364: 1361: 1358: 1355: 1352: 1349: 1346: 1343: 1340: 1337: 1334: 1331: 1328: 1325: 1322: 1319: 1316: 1313: 1310: 1307: 1304: 1301: 1298: 1295: 1292: 1289: 1286: 1283: 1280: 1277: 1274: 1271: 1268: 1265: 1262: 1259: 1256: 1253: 1250: 1247: 1244: 1241: 1238: 1235: 1232: 1229: 1226: 1223: 1220: 1217: 1214: 1211: 1208: 1205: 1202: 1195: 1191: 1187: 1183: 1179: 1175: 1171: 1167: 1163: 1157: 1153: 1149: 1145: 1141: 1137: 1126: 1121: 1120: 1117: 1114: 1111: 1108: 1105: 1102: 1099: 1096: 1093: 1090: 1087: 1084: 1081: 1078: 1075: 1072: 1069: 1066: 1063: 1060: 1057: 1054: 1051: 1048: 1045: 1042: 1039: 1036: 1033: 1030: 1027: 1024: 1021: 1018: 1015: 1012: 1009: 1006: 1003: 1000: 997: 994: 991: 988: 985: 982: 979: 976: 973: 970: 967: 964: 961: 958: 955: 952: 949: 946: 943: 940: 937: 934: 931: 928: 925: 922: 919: 916: 913: 910: 907: 903:(for stderr). 898: 892: 886: 879: 797: 788: 783: 768: 767: 750: 746: 742: 728: 717: 712: 711: 708: 705: 702: 699: 696: 693: 690: 687: 684: 681: 678: 675: 672: 669: 666: 663: 660: 657: 654: 651: 648: 645: 642: 639: 636: 634:iso_fortran_env 633: 630: 627: 624: 621: 618: 617: 614: 611: 608: 605: 602: 599: 596: 593: 590: 587: 584: 581: 578: 575: 572: 569: 566: 563: 560: 557: 554: 551: 548: 545: 542: 539: 532: 528: 524: 521:ISO_FORTRAN_ENV 520: 516: 515:for stdout and 512: 508: 502: 497: 489: 476: 459: 455: 451: 447: 444:<stdio.h> 443: 439: 428:file descriptor 412:standard output 401:standard output 378: 369: 365: 361: 358:<stdio.h> 357: 353: 349: 343:file descriptor 297: 280: 276: 272: 269:<stdio.h> 268: 264: 260: 254:file descriptor 239:pseudo terminal 204: 194:C's descendants 140: 100: 52:standard output 24: 17: 12: 11: 5: 2589: 2579: 2578: 2564: 2563: 2557: 2551: 2543: 2542:External links 2540: 2538: 2537: 2531: 2522:, John Lions, 2517: 2511: 2498: 2492: 2486: 2475: 2473: 2470: 2467: 2466: 2454:Linux Magazine 2439: 2410: 2385: 2364:McIlroy, M. D. 2355: 2333: 2320: 2302:(2013-12-11). 2300:Johnson, Steve 2291: 2273: 2251: 2237: 2236: 2234: 2231: 2230: 2229: 2224: 2215: 2210: 2205: 2200: 2193: 2190: 2122: 2119: 1846: 1836: 1833: 1825:StandardOutput 1511: 1201: 1198:respectively. 1150:System.Console 1125: 1122: 953:BufferedReader 941:BufferedReader 906: 878: 875: 869:, after which 855:Version 5 Unix 796: 793: 790: 789: 786: 784: 781: 778: 777: 774: 770: 769: 765: 727: 726:1968: ALGOL 68 724: 716: 715:1960: ALGOL 60 713: 620: 538: 501: 500:1950s: Fortran 498: 496: 493: 487: 483:standard error 474: 470:standard error 416:standard error 382:error messages 377: 374: 352:definition is 296: 293: 263:definition is 203: 200: 171:non-orthogonal 139: 136: 99: 96: 92:parent process 68:system console 60:standard error 44:standard input 15: 9: 6: 4: 3: 2: 2588: 2577: 2574: 2573: 2571: 2561: 2558: 2555: 2552: 2549: 2546: 2545: 2535: 2532: 2529: 2528:1-57398-013-7 2525: 2521: 2518: 2515: 2512: 2509: 2505: 2502: 2499: 2496: 2493: 2490: 2487: 2485: 2481: 2477: 2476: 2456: 2455: 2450: 2443: 2428: 2424: 2420: 2414: 2399: 2395: 2389: 2378: 2371: 2370: 2365: 2359: 2351: 2347: 2343: 2337: 2330: 2324: 2309: 2305: 2301: 2295: 2287: 2283: 2277: 2261: 2255: 2248: 2242: 2238: 2228: 2225: 2223: 2219: 2216: 2214: 2211: 2209: 2206: 2204: 2201: 2199: 2196: 2195: 2189: 2187: 2182: 2180: 2176: 2174: 2170: 2164: 2162: 2158: 2154: 2150: 2149:Services menu 2145: 2143: 2139: 2135: 2131: 2127: 2115:stdout_fileno 2022:stdout_fileno 1920:"w" 1878:stdout_fileno 1844: 1842: 1832: 1829:StandardError 1821:StandardInput 1819: 1815: 1203:// C# example 1199: 1161: 1140:(for stdin), 1135: 1131: 904: 901: 895: 891:(for stdin), 889: 884: 874: 872: 868: 864: 860: 856: 852: 848: 844: 842: 838: 834: 830: 829:magic numbers 826: 825:STDERR_FILENO 822: 821:STDOUT_FILENO 818: 814: 812: 806: 802: 785: 780: 779: 771: 762: 759: 754: 740: 736: 732: 723: 721: 637:implicit none 536: 506: 492: 486: 484: 480: 473: 471: 467: 463: 440:STDERR_FILENO 437: 433: 429: 424: 421: 417: 413: 408: 406: 402: 398: 397:text terminal 394: 390: 385: 383: 373: 354:STDOUT_FILENO 348: 344: 339: 337: 336:text terminal 333: 328: 326: 325: 320: 319: 314: 313: 308: 307: 302: 292: 290: 286: 259: 255: 252:systems, the 251: 246: 244: 240: 236: 232: 227: 225: 221: 220: 215: 214: 209: 199: 197: 195: 191: 186: 184: 178: 176: 172: 168: 163: 161: 157: 153: 149: 145: 135: 133: 129: 125: 119: 117: 113: 104: 95: 93: 89: 88:child process 85: 81: 77: 76:text terminal 73: 69: 65: 61: 57: 53: 49: 45: 41: 37: 33: 29: 22: 2519: 2494: 2488: 2458:. Retrieved 2452: 2442: 2431:. Retrieved 2422: 2413: 2401:. Retrieved 2397: 2388: 2368: 2358: 2345: 2336: 2323: 2312:. Retrieved 2294: 2285: 2276: 2264:. Retrieved 2254: 2241: 2208:Input/output 2183: 2177: 2165: 2146: 2124: 1944:stdin_fileno 1863:stdin_fileno 1838: 1808: 1178:(stdin) and 1162: 1127: 880: 859:special file 847:Ken Thompson 845: 840: 836: 832: 824: 820: 817:STDIN_FILENO 816: 815:definitions 808: 798: 757: 738: 729: 718: 503: 490: 482: 477: 475:2>&1 469: 464: 448:FILE* stderr 446:variable is 435: 425: 415: 411: 409: 400: 386: 379: 368:variable is 362:FILE* stdout 360:variable is 340: 329: 322: 316: 310: 304: 300: 298: 265:STDIN_FILENO 247: 228: 217: 211: 207: 205: 198: 187: 179: 166: 164: 160:line printer 141: 120: 109: 63: 59: 55: 51: 47: 43: 40:input/output 31: 25: 1124:2000s: .NET 1016:parseDouble 709:end program 688:OUTPUT_UNIT 529:OUTPUT_UNIT 511:for stdin, 306:file rename 285:C++ streams 273:FILE* stdin 175:end of file 112:binary data 98:Application 80:redirection 2460:2021-04-11 2433:2017-12-10 2314:2020-11-07 2233:References 2179:GTK-server 1818:properties 1132:and other 1109:getMessage 900:System.err 894:System.out 877:1995: Java 751:stand back 661:INPUT_UNIT 533:ERROR_UNIT 525:INPUT_UNIT 488:>& 450:. The C++ 332:redirected 231:redirected 156:disk drive 138:Background 128:pagination 2161:selection 1774:WriteLine 1729:WriteLine 1684:WriteLine 1624:WriteLine 1479:WriteLine 1431:WriteLine 1383:WriteLine 1317:WriteLine 1067:Exception 888:System.in 867:Version 6 863:Version 8 747:stand out 460:std::clog 456:std::cerr 420:buffering 370:std::cout 2570:Category 2504:Archived 2427:Archived 2377:Archived 2366:(1987). 2350:Archived 2308:Archived 2192:See also 2157:Mac OS X 2153:NeXTSTEP 2130:Synaptic 1804:Function 1567:ReadLine 1519:Function 1266:ReadLine 995:readLine 811:unistd.h 776:Output: 743:stand in 739:transput 731:ALGOL 68 720:ALGOL 60 625:program 549:INTEGER 543:PROGRAM 495:Timeline 405:pipeline 277:std::cin 243:keyboard 235:terminal 124:pipeline 84:pipeline 2472:Sources 2403:20 July 2346:die.net 2266:8 April 1765:Console 1720:Console 1675:Console 1612:Console 1558:Console 1531:Integer 1467:Console 1419:Console 1371:Console 1305:Console 1254:Console 1091:println 1040:println 799:In the 782:3.14159 773:Input: 758:Example 640:integer 505:Fortran 330:Unless 229:Unless 21:STREAMS 2530:, 1977 2526:  2222:SYSOUT 2173:DOSBox 2109:stdout 2088:stdout 2058:" 2052:" 2013:" 2007:" 1977:stdout 1902:stdout 1890:stdout 1851:import 1841:Python 1827:, and 1792:Return 1759:System 1750:System 1714:System 1705:System 1669:System 1660:System 1642:Return 1636:number 1606:System 1588:Double 1582:Double 1576:number 1552:System 1546:String 1516:Public 1494:return 1461:System 1413:System 1365:System 1335:return 1329:number 1299:System 1281:double 1275:number 1272:double 1248:System 1239:string 1221:string 1209:static 1206:public 1152:(e.g. 1079:System 1052:number 1028:System 1010:Double 1004:number 1001:double 980:String 968:System 923:String 911:static 908:public 841:stderr 839:, and 837:stdout 749:, and 735:Koster 706:number 673:number 646:number 612:NUMBER 579:NUMBER 552:NUMBER 531:, and 517:UNIT=0 513:UNIT=6 509:UNIT=5 466:Bourne 116:daemon 64:stderr 58:) and 56:stdout 2380:(PDF) 2373:(PDF) 2218:SYSIN 2094:close 2028:write 1983:write 1875:stdin 1814:class 1741:Catch 1696:Catch 1651:Catch 1594:Parse 1473:Error 1446:catch 1425:Error 1398:catch 1377:Error 1350:catch 1287:Parse 1061:catch 833:stdin 805:POSIX 676:write 582:WRITE 432:POSIX 347:POSIX 321:, or 301:write 258:POSIX 250:POSIX 82:or a 72:shell 48:stdin 2576:Unix 2524:ISBN 2405:2012 2268:2022 2220:and 2184:The 2171:and 2155:and 2147:The 2121:GUIs 2046:inps 2034:ctrs 2001:inps 1989:ctrs 1950:ctrs 1938:inps 1908:open 1522:Main 1224:args 1215:Main 1194:and 1174:are 1170:and 1134:.NET 1112:()); 926:args 917:main 914:void 883:Java 851:sort 813:> 809:< 682:unit 655:unit 649:read 631:use 628:main 588:UNIT 561:UNIT 555:READ 546:MAIN 458:and 426:The 414:and 341:The 318:move 237:(or 216:and 208:read 144:Unix 132:more 122:the 2482:", 2169:pSX 2142:GTK 2134:KDE 2103:sys 2082:sys 2070:ctr 2064:ctr 1971:sys 1962:ctr 1956:str 1935:for 1926:ctr 1896:sys 1884:sys 1869:sys 1854:sys 1801:End 1789:Try 1786:End 1744:ex3 1699:ex2 1618:Out 1573:Dim 1537:Dim 1534:Try 1311:Out 1269:(); 1233:try 1212:int 1160:). 1128:In 1085:err 1034:out 998:(); 977:)); 959:new 950:new 935:try 881:In 861:in 853:in 823:or 615:END 479:csh 324:ren 248:On 213:dir 50:), 26:In 2572:: 2451:. 2425:. 2421:. 2396:. 2348:. 2344:. 2284:. 2175:. 2140:, 2138:Qt 2097:() 2055:\n 2010:\n 1941:in 1823:, 1747:As 1702:As 1657:As 1654:ex 1579:As 1570:() 1543:As 1528:As 1525:() 1488:); 1440:); 1392:); 1332:); 1296:); 1260:In 1190:, 1166:, 1130:C# 1055:); 1025:); 989:br 974:in 944:br 835:, 819:, 753:. 745:, 643::: 527:, 372:. 315:, 312:mv 291:. 245:. 219:ls 158:, 154:, 150:, 94:. 30:, 2478:" 2463:. 2436:. 2407:. 2327:" 2317:. 2270:. 2112:= 2106:. 2091:. 2085:. 2076:1 2073:+ 2067:= 2061:) 2049:+ 2043:+ 2037:+ 2031:( 2025:. 2016:) 2004:+ 1998:+ 1992:+ 1986:( 1980:. 1974:. 1965:) 1959:( 1953:= 1947:: 1932:0 1929:= 1923:) 1917:, 1911:( 1905:= 1899:. 1887:. 1881:= 1872:. 1866:= 1798:1 1795:- 1783:) 1777:( 1771:. 1768:. 1762:. 1753:. 1738:) 1732:( 1726:. 1723:. 1717:. 1708:. 1693:) 1687:( 1681:. 1678:. 1672:. 1663:. 1645:0 1639:) 1633:, 1627:( 1621:. 1615:. 1609:. 1603:) 1600:s 1597:( 1591:. 1585:= 1564:. 1561:. 1555:. 1549:= 1540:s 1506:} 1503:; 1500:1 1497:- 1491:} 1482:( 1476:. 1470:. 1464:. 1458:{ 1455:) 1449:( 1443:} 1434:( 1428:. 1422:. 1416:. 1410:{ 1407:) 1401:( 1395:} 1386:( 1380:. 1374:. 1368:. 1362:{ 1359:) 1353:( 1347:} 1341:; 1338:0 1326:, 1320:( 1314:. 1308:. 1302:. 1293:s 1290:( 1284:. 1278:= 1263:. 1257:. 1251:. 1245:= 1242:s 1236:{ 1230:{ 1227:) 1218:( 1118:} 1115:} 1106:. 1103:e 1100:+ 1094:( 1088:. 1082:. 1076:{ 1073:) 1070:e 1064:( 1058:} 1049:+ 1043:( 1037:. 1031:. 1022:s 1019:( 1013:. 1007:= 992:. 986:= 983:s 971:. 965:( 956:( 947:= 938:{ 932:{ 929:) 920:( 703:, 697:) 691:, 685:= 679:( 670:) 667:* 664:, 658:= 652:( 609:, 603:) 597:, 594:6 591:= 585:( 576:) 573:* 570:, 567:5 564:= 558:( 190:C 62:( 54:( 46:( 23:.

Index

STREAMS
computer programming
communication channels
input/output
system console
shell
text terminal
redirection
pipeline
child process
parent process

binary data
daemon
pipeline
pagination
more
Unix
punch card reader
magnetic tape drive
disk drive
line printer
non-orthogonal
end of file
job control language
C
C's descendants
dir
ls
command-line arguments

Text is available under the Creative Commons Attribution-ShareAlike License. Additional terms may apply.