diff --git a/usr.bin/uudecode/uudecode.c b/usr.bin/uudecode/uudecode.c index e4290b825900..270d0557f17e 100644 --- a/usr.bin/uudecode/uudecode.c +++ b/usr.bin/uudecode/uudecode.c @@ -96,6 +96,8 @@ main(int argc, char *argv[]) oflag = 1; /* output to the specified file */ sflag = 1; /* do not strip pathnames for output */ outfile = optarg; /* set the output filename */ + if (strcmp(outfile, "/dev/stdout") == 0) + pflag = 1; break; case 'p': if (oflag) diff --git a/usr.bin/uuencode/uuencode.1 b/usr.bin/uuencode/uuencode.1 index 4ffd48ce9985..0fe44cdd0a57 100644 --- a/usr.bin/uuencode/uuencode.1 +++ b/usr.bin/uuencode/uuencode.1 @@ -179,7 +179,7 @@ The following example extract a compress'ed tar archive from your mailbox .Pp .Bd -literal -offset indent -compact -uudecode -p < $MAIL | zcat | tar xfv - +uudecode -o /dev/stdout < $MAIL | zcat | tar xfv - .Ed .Sh SEE ALSO .Xr basename 1 ,