summaryrefslogtreecommitdiff
path: root/usr.bin/printf/printf.1
AgeCommit message (Collapse)Author
2023-11-26usr.bin: Remove ancient SCCS tags.Warner Losh
Remove ancient SCCS tags from the tree, automated scripting, with two minor fixup to keep things compiling. All the common forms in the tree were removed with a perl script. Sponsored by: Netflix
2023-08-16Remove $FreeBSD$: one-line nroff patternWarner Losh
Remove /^\.\\"\s*\$FreeBSD\$$\n/
2020-07-01printf(1): Add EXAMPLES sectionFernando ApesteguĂ­a
* Small addition with four simple examples * While here, remove three obsolete .Tn macros Approved by: manpages (gbe) Differential Revision: https://reviews.freebsd.org/D25462 Notes: svn path=/head/; revision=362843
2019-07-29printf(1): Note that \c only works in %b stringsJilles Tjoelker
PR: 238313 Reported by: Andras Farkas MFC after: 1 week Notes: svn path=/head/; revision=350425
2017-02-28Renumber copyright clause 4Warner Losh
Renumber cluase 4 to 3, per what everybody else did when BSD granted them permission to remove clause 3. My insistance on keeping the same numbering for legal reasons is too pedantic, so give up on that point. Submitted by: Jan Schaumann <jschauma@stevens.edu> Pull Request: https://github.com/freebsd/freebsd/pull/96 Notes: svn path=/head/; revision=314436
2014-04-21Add parameterized position handling to printf(1).Pedro F. Giffuni
Add a new %n$ option to change the order of the parameters as done in the ksh93 builtin printf (among others). For example: %printf '%2$1d %1$s\n' one 2 three 4 2 one 4 three The feature was written by Garret D'Amore under a BSD license for Nexenta/illumos. Reference: http://garrett.damore.org/2010/10/new-implementation-of-printf.html PR: bin/152934 Obtained from: Illumos MFC after: 2 weeks Notes: svn path=/head/; revision=264743
2012-03-29Remove trailing whitespace per mdoc lint warningEitan Adler
Disussed with: gavin No objection from: doc Approved by: joel MFC after: 3 days Notes: svn path=/head/; revision=233648
2011-05-28printf(1): Document that %c and precision for %b/%s use bytes, not chars.Jilles Tjoelker
This means these features do not work as expected with multibyte characters. This perhaps less than ideal behaviour matches printf(3) and is specified by POSIX. Notes: svn path=/head/; revision=222421
2011-05-28printf: Allow multibyte characters for '<char> form, avoid negative codes.Jilles Tjoelker
Examples: LC_ALL=en_US.UTF-8 printf '%d\n' $(printf \'\\303\\244) LC_ALL=en_US.ISO8859-1 printf '%d\n' $(printf \'\\344) Both of these should print 228. Like some other shells, incomplete or invalid multibyte characters yield the value of the first byte without a warning. Note that there is no general way to go back from the character code to the character. Notes: svn path=/head/; revision=222418
2011-04-25printf(1): Move non-bugs from the BUGS section to a new section CAVEATS.Jilles Tjoelker
Notes: svn path=/head/; revision=221026
2011-04-25printf(1): Mention effect of '#' modifier on other conversions.Jilles Tjoelker
Notes: svn path=/head/; revision=221013
2010-12-11Remove the advertising clause from UCB copyrighted files in usr.bin. ThisJoel Dahl
is in accordance with the information provided at ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change Also add $FreeBSD$ to a few files to keep svn happy. Discussed with: imp, rwatson Notes: svn path=/head/; revision=216370
2010-11-19sh: Add printf builtin.Jilles Tjoelker
This was removed in 2001 but I think it is appropriate to add it back: * I do not want to encourage people to write fragile and non-portable echo commands by making printf much slower than echo. * Recent versions of Autoconf use it a lot. * Almost no software still wants to support systems that do not have printf(1) at all. * In many other shells printf is already a builtin. Side effect: printf is now always the builtin version (which behaves identically to /usr/bin/printf) and cannot be overridden via PATH (except via the undocumented %builtin mechanism). Code size increases about 5K on i386. Embedded folks might want to replace /usr/bin/printf with a hard link to /usr/bin/alias. Notes: svn path=/head/; revision=215520
2010-09-09Note bug in trying to printf(1) things like: '-%s\n' "foo"David E. O'Brien
Notes: svn path=/head/; revision=212374
2010-09-05printf(1): Clarify that \OOO produces a byte, different %b escape sequences.Jilles Tjoelker
Octal escape sequences are expanded to bytes, not characters, and multiple are required for a multibyte character. The valid escape sequences in %b strings are slightly different from the escape sequences in the format string. Notes: svn path=/head/; revision=212244
2005-06-14Markup and wording fixes.Ruslan Ermilov
Approved by: re (blanket) Notes: svn path=/head/; revision=147370
2005-04-14Update the bugs section, null characters in the format string are now handled.Stefan Farfeleder
Notes: svn path=/head/; revision=145084
2005-03-21Support the L modifier for floating-point values as an extension.David Schultz
When L is omitted, double precision is used, so printf(1) gives reproducable results. When L is specified, long double precision is used, which may improve precision, depending on the machine. Notes: svn path=/head/; revision=143906
2005-01-17Added the EXIT STATUS section where appropriate.Ruslan Ermilov
Notes: svn path=/head/; revision=140368
2004-07-03Fix a markup nit and a misplaced full stop in previous.Tim J. Robbins
Noticed by: ru Notes: svn path=/head/; revision=131519
2004-07-03Document missing multibyte character support in utilities specifiedTim J. Robbins
by POSIX. Notes: svn path=/head/; revision=131511
2004-07-03Deal with double whitespace.Ruslan Ermilov
Notes: svn path=/head/; revision=131507
2004-07-02Mechanically kill hard sentence breaks.Ruslan Ermilov
Notes: svn path=/head/; revision=131491
2004-06-05s/latter/former/David Schultz
Notes: svn path=/head/; revision=130117
2004-06-05- Document the %a, %A, and %F format specifiers.David Schultz
- Document the way infinity and NaN are printed. - Un-document the non-existent %w specifier. Notes: svn path=/head/; revision=130116
2002-07-15Kill excessive whitespace between macro arguments.Giorgos Keramidas
Notes: svn path=/head/; revision=100045
2002-05-31Typo: characer -> characterGiorgos Keramidas
Notes: svn path=/head/; revision=97643
2002-05-30mdoc(7) police: lint.Ruslan Ermilov
Notes: svn path=/head/; revision=97541
2002-04-23 - printf shouldn't bail out if a conversion fails, it should just keepJuli Mallett
processing them. - \c escape to immediately stop output (similar to echo's \c) - \0NNN should be allowed for octal character escapes (instead of just \NNN) - %b conversion, which is like %s but interprets \n \t etc. inside the string is missing. And I may not be any poet, but in lieu of an in-tree regression test: ref5% ./printf '%s%b%b%c%s%d\n' 'PR' '\0072' '\t' '3' '56' 0x10 PR: 35616 Submitted by: tjr MFC after: 1 week Notes: svn path=/head/; revision=95300
2002-04-20Use `The .Nm utility'Philippe Charnier
Notes: svn path=/head/; revision=95124
2002-01-16Replace reference to ANSI C draft with standard.Ruslan Ermilov
PR: docs/30731 Notes: svn path=/head/; revision=89426
2001-11-23The RETURN VALUES section is not appropriate for section 1 manualDima Dorfman
pages; rename it to DIAGNOSTICS. Also use the .Ex macro while I'm here. Notes: svn path=/head/; revision=86824
2001-11-20Remove the printf builtin command from sh(1), which command is notAkinori MUSHA
used so often that it's worth keeping it as a builtin. Now that all the printf invocations from within the system startup scripts, we can safely remove it. Urged by: sheldonh :) No MFC is planned so far because it may break compatibility and violate POLA. Notes: svn path=/head/; revision=86692
2001-07-15Remove whitespace at EOL.Dima Dorfman
Notes: svn path=/head/; revision=79755
2001-07-06mdoc(7) police: sort SEE ALSO xrefs (sort -b -f +2 -3 +1 -2).Ruslan Ermilov
Notes: svn path=/head/; revision=79366
2001-02-10mdoc(7) police: mark LC_NUMERIC with .Dv.Ruslan Ermilov
Notes: svn path=/head/; revision=72313
2001-02-10Localize it (LC_NUMERIC)Andrey A. Chernov
Notes: svn path=/head/; revision=72304
2000-12-19Prepare for mdoc(7)NG.Ruslan Ermilov
Notes: svn path=/head/; revision=70197
2000-07-21Revert to 1.8. I misread the sentence and its context.Chris Costello
Notes: svn path=/head/; revision=63734
2000-07-21Properly document %.0f behavior.Chris Costello
Notes: svn path=/head/; revision=63733
2000-01-19Document truncation of strings when a NUL character is reached in a formatChris Costello
string. PR: 15929 Submitted by: Daniel Hagan <dhagan@cs.vt.edu> Notes: svn path=/head/; revision=56264
1999-09-14Correct some hard sentence breaks. Only those surrounding the previousSheldon Hearn
commit and those which cause ugly nroff output have been fixed, since the purpose of the style guideline which they contravene is to reduce the sizes of deltas. Reported by: bde Notes: svn path=/head/; revision=51275
1999-09-08Improve shell documentation:Sheldon Hearn
* Consistently misspell built-in as builtin. * Add a builtin(1) manpage and create builtin(1) MLINKS for all shell builtin commands for which no standalone utility exists. These MLINKS replace those that were created for csh(1). * Add appropriate xrefs for builtin(1) to the csh(1) and sh(1) manpages, as well as to the manpages of standalone utilities which are supported as shell builtin commands in at least one of the shells. In such manpages, explain that similar functionality may be provided as a shell builtin command. * Improve sh(1)'s description of the cd builtin command. Csh(1) already describes it adequately. Replace the cd(1) manpage with a builtin(1) MLINKS link. * Clean up some mdoc problems: use Xr instead of literal "foo(n)"; use Ic instead of Xr for shell builtin commands. * Undo English contractions. Reviewed by: mpp, rgrimes Notes: svn path=/head/; revision=51090
1999-08-28$Id$ -> $FreeBSD$Peter Wemm
Notes: svn path=/head/; revision=50477
1999-07-12Add $Id$, to make it simpler for members of the translation teams toNik Clayton
track. The $Id$ line is normally at the bottom of the main comment block in the man page, separated from the rest of the manpage by an empty comment, like so; .\" $Id$ .\" If the immediately preceding comment is a @(#) format ID marker than the the $Id$ will line up underneath it with no intervening blank lines. Otherwise, an additional blank line is inserted. Approved by: bde Notes: svn path=/head/; revision=48792
1997-08-04Correct Synopsys section.Philippe Charnier
Notes: svn path=/head/; revision=27887
1996-04-09Correctly match the format flags and their descriptions.Mike Pritchard
Submitted by: Dave Glowacki <dglo@ssec.wisc.edu> Notes: svn path=/head/; revision=15163
1994-05-27BSD 4.4 Lite Usr.bin SourcesRodney W. Grimes
Notes: svn path=/cvs2svn/branches/CHRISTOS/; revision=1590