Date: Fri, 15 Mar 2002 03:08:39 -0500 From: parv <parv_@yahoo.com> To: f-q <freebsd-questions@freebsd.org> Subject: /usr/bin/printf & printing escaped characters Message-ID: <20020315080839.GA18963@moo.holy.cow>
next in thread | raw e-mail | index | archive | help
i was trying to print escaped characters (\n & \t), but couldn't...
# /usr/bin/printf %s "\tpolka dot\n"
\tpolka dot\n
...despite having listed in the man page...
Character escape sequences are in backslash notation as defined in the
ANSI X3.159-1989 (``ANSI C''). The characters and their meanings are as
follows:
\a Write a <bell> character.
\b Write a <backspace> character.
\f Write a <form-feed> character.
\n Write a <new-line> character.
\r Write a <carriage return> character.
\t Write a <tab> character.
\v Write a <vertical tab> character.
\' Write a <single quote> character.
\\ Write a backslash character.
\num Write an 8-bit character whose ASCII value is the 1-, 2-,
or 3-digit octal number num.
...i didn't see anything else in there. what am i missing?
and using awk for this is just plain sick & twisted.
- parv
--
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020315080839.GA18963>
