Printf (Unix) (original) (raw)
In Unix and Unix-like operating systems, printf ("print formatted") is a shell builtin (and utility program) that formats and prints data. The command accepts a printf format string, which specifies methods for formatting items, and a list of items to be formatted. Named historically after the intention of printing to a printer, it now actually outputs to stdout. Characters in the format string are copied to the output or, if a % is encountered, are used to format an item. In addition to the standard formats, %b causes printf to expand backslash escape sequences (for example for newline), and %q outputs an item that can be used as shell input. The format string is reused if there are more items than format specs. Unused format specs provide a zero value or null string.
Property | Value |
---|---|
dbo:abstract | In Unix and Unix-like operating systems, printf ("print formatted") is a shell builtin (and utility program) that formats and prints data. The command accepts a printf format string, which specifies methods for formatting items, and a list of items to be formatted. Named historically after the intention of printing to a printer, it now actually outputs to stdout. Characters in the format string are copied to the output or, if a % is encountered, are used to format an item. In addition to the standard formats, %b causes printf to expand backslash escape sequences (for example for newline), and %q outputs an item that can be used as shell input. The format string is reused if there are more items than format specs. Unused format specs provide a zero value or null string. (en) |
dbo:computingPlatform | dbr:Cross-platform |
dbo:developer | dbr:Commercial_software dbr:Open-source_software |
dbo:genre | dbr:Command_(computing) |
dbo:license | dbr:Coreutils |
dbo:operatingSystem | dbr:Unix dbr:Unix-like |
dbo:wikiPageID | 26068831 (xsd:integer) |
dbo:wikiPageLength | 3158 (xsd:nonNegativeInteger) |
dbo:wikiPageRevisionID | 1075001488 (xsd:integer) |
dbo:wikiPageWikiLink | dbr:Printf_format_string dbr:X/Open dbr:Berkeley_Software_Distribution dbc:IBM_i_Qshell_commands dbr:Character_(computing) dbr:Unix dbr:Unix-like dbr:GPLv3+ dbr:Command_(computing) dbr:Commercial_software dbr:Cross-platform dbr:Escape_sequence dbr:Shell_builtin dbr:Empty_string dbr:Single_Unix_Specification dbr:Stdout dbr:Computer_program dbr:GNU dbr:Printer_(computing) dbc:Standard_Unix_programs dbr:Newline dbr:Open-source_software dbr:Operating_system dbr:Shell_(computing) dbr:Coreutils dbr:Printf |
dbp:developer | Various open-source and commercial developers (en) |
dbp:genre | dbr:Command_(computing) |
dbp:license | dbr:GPLv3+ dbr:Coreutils |
dbp:name | printf (en) |
dbp:operatingSystem | Unix and Unix-like (en) |
dbp:platform | dbr:Cross-platform |
dbp:wikiPageUsesTemplate | dbt:Unix_commands dbt:Code dbt:Infobox_software dbt:Refimprove dbt:Reflist dbt:Short_description dbt:Tt dbt:Wikibooks dbt:Lowercase |
dct:subject | dbc:IBM_i_Qshell_commands dbc:Standard_Unix_programs |
gold:hypernym | dbr:Builtin |
rdf:type | owl:Thing dbo:Software schema:CreativeWork dbo:Work wikidata:Q386724 wikidata:Q7397 yago:WikicatStandardUnixPrograms yago:Abstraction100002137 yago:Cognition100023271 yago:Content105809192 yago:Idea105833840 yago:Plan105898568 yago:PsychologicalFeature100023100 |
rdfs:comment | In Unix and Unix-like operating systems, printf ("print formatted") is a shell builtin (and utility program) that formats and prints data. The command accepts a printf format string, which specifies methods for formatting items, and a list of items to be formatted. Named historically after the intention of printing to a printer, it now actually outputs to stdout. Characters in the format string are copied to the output or, if a % is encountered, are used to format an item. In addition to the standard formats, %b causes printf to expand backslash escape sequences (for example for newline), and %q outputs an item that can be used as shell input. The format string is reused if there are more items than format specs. Unused format specs provide a zero value or null string. (en) |
rdfs:label | Printf (Unix) (en) |
owl:sameAs | freebase:Printf (Unix) yago-res:Printf (Unix) wikidata:Printf (Unix) https://global.dbpedia.org/id/4tynn |
prov:wasDerivedFrom | wikipedia-en:Printf_(Unix)?oldid=1075001488&ns=0 |
foaf:isPrimaryTopicOf | wikipedia-en:Printf_(Unix) |
foaf:name | printf (en) |
is dbo:wikiPageWikiLink of | dbr:Qshell dbr:List_of_Unix_commands dbr:Printf_format_string dbr:Toybox dbr:Echo_(command) |
is foaf:primaryTopic of | wikipedia-en:Printf_(Unix) |