#!/usr/local/bin/perl -w eval 'exec /usr/local/bin/perl -w -S $0 ${1+"$@"}' if 0; # not running under some shell # printf - format and print data use strict; END { close STDOUT || die "$0: can't close stdout: $!\n"; $? = 1 if $? == 255; # from die } unless (@ARGV) { die "usage: $0 format [argument ...]\n"; } my $format = shift; eval qq(printf "$format", \@ARGV); die if $@; __END__ =head1 NAME printf - format and print data =head1 SYNOPSIS B I [ I ... ] =head1 DESCRIPTION The B command uses the first argument as the format that describes how to print the remaining arguments. Unlike the standard printf(1) command, this one uses the Perl version, which means that the C<\v> escape is not supported, but various other things are. See L for details. =head1 RESTRICTIONS This command should not be used in setuid programs as it does not run untaint its argments and will trigger errors like C =head1 SEE ALSO printf(3), L =head1 AUTHOR Tom Christiansen, I. =head1 COPYRIGHT and LICENSE This program is copyright (c) Tom Christiansen 1999. This program is free and open software. You may use, modify, distribute, and sell this program (and any modified variants) in any way you wish, provided you do not restrict others from doing the same.