GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
UNWIZ(1) FreeBSD General Commands Manual UNWIZ(1)

inviz - Converts escape sequences to binary; reverses viz(1)

inviz [ file ... ]

Inviz copies its input to its output, translating escape sequences that are found. It will properly invert the output of viz -t, thus recreating the original file. For example, typing viz < infile | inviz > copy_of_infile will create an exact copy of infile.

Inviz copies from file (or from stdin, if there is no file given) and writes to stdout. These escape sequences are of the form \c
or \nnn
It also specially treats lines that begin \#datatype ...
which are lines containing text to convert to binary numbers (chars, shorts, ints, longs, doubles, or floats).

Backslash sequences \c and \nnn are used to produce the usual C escapes, with the addition of \@ translating to null.

The complete set of `backslash' escape sequences is:

`\\' → `\'
`\@' → null
`\%' → percent
`\b' → backspace
`\f' → formfeed
`\n' → newline
`\r' → return
`\t' → tab
`\nnn' → ascii character with this octal value
`\Innn...' → ascii character with this hex value

Embedded newlines are discarded; to produce a newline in the output, the escape sequence `\n' must appear in the input.

Lines that begin \#datatype
are to be translated into binary numbers. Here the datatype is one of {C,S,I,L,F,D}, and means, respectively, that the text on the rest of the line is to be translated into chars, shorts, ints, longs, floats, or doubles. The rest of the line is made up of the usual sort of text representations of numbers, separated by whitespace. When the datavalue is an integer value (whether char, short, int, or long) may be expressed in octal (0nnn), hex (0xnnn or 0Xnnn), or decimal. If the value is octal or hex, the corresponding output value will be unsigned. If decimal, the type is unsigned unless the number begins with `+' or `-', in which case a signed number is output. In all cases, sscanf(3) is initially used to convert the text to a long int or double value, so any restrictions that apply to sscanf(3) conversions also apply here.

1. To output the two integers 234 (hex) and 2345 (decimal), followed by the float value 6.4, the input text could be:


\#I 0x234 2345
\#F 6.4

2. To output a form feed followed by the integers 5 and 124, the short -16, and finally a string "456abc%" on a new line, use input like:


\f
\#I 5 124
\#S -16
\n456abc%

Will Deich

viz(1)
local

Search for    or go to Top of page |  Section 1 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.