Civil Rights
Movements, leaders, victories and the continuing fight for equality.
Explore the people, places, events, achievements, struggles and stories that shaped our journey.
Movements, leaders, victories and the continuing fight for equality.
Innovation, patents, science, technology and world-changing contributions.
Pioneers, champions, Negro Leagues, records, activism and excellence.
Meet the people whose lives, choices and achievements shaped the journey.
Black towns, communities, institutions and places where history happened.
Moments that changed communities, movements, institutions and the nation.
Mansa Musa was the ruler of the Mali Empire in West Africa. Details recorded here should be sourced; unknown information is left blank.
MORE →Reflects the personal views, recollections, and perspective of the author, Mike Davis.
This is a personal recollection on the Move fire on May 13, 1985
This article needs more citations. (July 2010) |
| printf | |
|---|---|
| Developers | Various open-source and commercial developers |
| Operating system | Unix and Unix-like |
| Platform | Cross-platform |
| Type | Command |
| License | coreutils: GPLv3+[1] |
printf is a shell command that formats and outputs text like the same-named C function. It is available in a variety of Unix and Unix-like systems. Some shells implement the command as builtin and some provide it as a utility program[2]
The command has similar syntax and semantics as the library function. The command outputs text to standard output[3] as specified by a format string and a list of values. Characters of the format string are copied to the output verbatim except when a format specifier is found which causes a value to be output per the specifier.
The command has some aspects unlike the library function. In addition to the library function format specifiers, %b causes the command to expand backslash escape sequences (for example \n for newline), and %q outputs an item that can be used as shell input.[3] The value used for an unmatched specifier (too few values) is an empty string for %s or 0 for a numeric specifier. If there are more values than specifiers, then the command restarts processing the format string from its beginning,
The command is part of the X/Open Portability Guide since issue 4 of 1992. It was inherited into the first version of POSIX.1 and the Single Unix Specification.[4] It first appeared in 4.3BSD-Reno.[5]
The implementation bundled in GNU Core Utilities was written by David MacKenzie. It has an extension %q for escaping strings in POSIX-shell format.[3]
This prints a list of numbers:
$ for N in 4 8 10; do printf " >> %03d << \n" $N; done
>> 004 <<
>> 008 <<
>> 010 <<
This produces output for a directory's content similar to ls:
$ printf "%s\n" *
Source: Wikipedia. Article content is retrieved live through the MediaWiki API.
printf is a shell command that formats and outputs text like the same-named C function. It is available in a variety of Unix and Unix-like systems. Some shells implement the command as builtin and some provide it as a utility program The command has similar syntax and semantics as the library function. The command outputs text to standard output as specified by a format string and a list of values. Characters of the format string are copied to the output verbatim except when a format specifier is found which causes a value to be output per the specifier. The command has some aspects unlike the library function. In addition to the library function format specifiers, %b causes the command to expand backslash escape sequences (for example \n for newline), and %q outputs an item that can be used as shell input. The value used for an unmatched specifier (too few values) is an empty string for %s or 0 for a numeric specifier. If there are more values than specifiers, then the command restarts processing the format string from its beginning, The command is part of the X/Open Portability Guide since issue 4 of 1992. It was inherited into the first version of POSIX.1 and the Single Unix Specification. It first appeared in 4.3BSD-Reno. The implementation bundled in GNU Core Utilities was written by David MacKenzie. It has an extension %q for escaping strings in POSIX-shell format.
is a header file in the standard library of the C programming language. It defines macros for reporting and retrieving error conditions using the symbol errno (short form for "error number"). errno acts like an integer variable. A value (the error number) is stored in errno by certain library functions when they detect errors. At program startup, the value stored is zero. Library functions store only values greater than zero. Any library function can alter the value stored before return, whether or not they detect errors. Most functions indicate that they detected an error by returning a special value, typically NULL for functions that return pointers, and -1 for functions that return integers. A few functions require the caller to preset errno to zero and test it afterwards to see if an error was detected. The errno macro expands to an lvalue with type int, sometimes with the extern and/or volatile type specifiers depending upon the platform. Originally this was a static memory location, but macros are almost always used today to allow for multi-threading, so that each thread will see its own thread-local error number. The header file also defines macros that expand to integer constants that represent the error codes. The C standard library only requires three to be defined: POSIX compliant operating systems like AIX, Linux or Solaris include many other error values, many of which are used much more often than the above ones, such as EACCES for when a file cannot be opened for reading. C++11 additionally defines many of the same values found within the POSIX specification. Traditionally, the first page of Unix system manuals, named intro(2), lists all errno.h macros, but this is not the case with Linux, where these macros are instead listed in the errno(3). An errno can be translated to a descriptive string using strerror (defined in ) or a BSD extension called sys_errlist. The translation can be printed directly to the standard error stream using perror (defined in ). As strerror in many Unix-like systems is not thread-safe, a thread-safe version strerror_r is used, but conflicting definitions from POSIX and GNU makes it even less portable than the sys_errlist table.
printf is a C standard library function and is also a Linux terminal (shell) command that formats text and writes it to standard output. The function accepts a format C-string argument and a variable number of value arguments that the function serializes per the format string. Mismatch between the format specifiers and count and type of values results in undefined behavior, and the program might crash or vulnerabilities may arise. The format string is encoded as a template language consisting of verbatim text and format specifiers that each specify how to serialize a value. As the format string is processed left-to-right, a subsequent value is used for each format specifier found. A format specifier starts with a % character and has one or more following characters that specify how to serialize a value. The standard library provides other, similar functions that form a family of printf-like functions. The functions share the same formatting capabilities but provide different behavior such as output to a different destination or safety measures that limit exposure to vulnerabilities. Functions of the printf-family have been implemented in other computer programming contexts (i.e., programming languages) with the same or similar syntax and semantics. The scanf() C standard library function complements printf by providing formatted input (a.k.a. lexing, a.k.a. parsing) via a similar format string syntax. The name, printf, is short for print formatted where print refers to output to a printer although the function is not limited to printer output. Today, print refers to output to any text-based environment such as a terminal or a file.
crt0 (also known as c0) is a set of execution startup routines linked into a C program that performs any initialization work required before calling the program's main function. After the main function completes the control returns to crt0, which calls the library function exit with the return code of the main function to terminate the process.
Before the 1921 destruction of Tulsa’s Greenwood District, Black residents had created a remarkable center of business and community life. The district included stores, professional offices, entertainment venues and homes owned by Black citizens. Understanding Greenwood means learning what was built—not only what was burned.
MORE →Shirley Chisholm, elected in 1968.