From 129853101d5707b7d18f28f39e748fa65a36add2 Mon Sep 17 00:00:00 2001 From: jilles Date: Fri, 19 Nov 2010 12:56:13 +0000 Subject: sh: Add printf builtin. 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. --- share/man/man1/builtin.1 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'share/man/man1') diff --git a/share/man/man1/builtin.1 b/share/man/man1/builtin.1 index cbfc873..5a6b5ae 100644 --- a/share/man/man1/builtin.1 +++ b/share/man/man1/builtin.1 @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 9, 2010 +.Dd November 19, 2010 .Dt BUILTIN 1 .Os .Sh NAME @@ -99,6 +99,7 @@ .Nm onintr , .Nm popd , .Nm printenv , +.Nm printf , .Nm pushd , .Nm pwd , .Nm read , @@ -263,6 +264,7 @@ but are implemented as scripts using a builtin command of the same name. .It Ic onintr Ta \&No Ta Yes Ta \&No .It Ic popd Ta \&No Ta Yes Ta \&No .It Ic printenv Ta Yes Ta Yes Ta \&No +.It Ic printf Ta Yes Ta \&No Ta Yes .It Ic pushd Ta \&No Ta Yes Ta \&No .It Ic pwd Ta Yes Ta \&No Ta Yes .It Ic read Ta No** Ta \&No Ta Yes @@ -313,6 +315,7 @@ but are implemented as scripts using a builtin command of the same name. .Xr nice 1 , .Xr nohup 1 , .Xr printenv 1 , +.Xr printf 1 , .Xr pwd 1 , .Xr sh 1 , .Xr test 1 , -- cgit v1.1