FILE2C(1)

NAME
file2c - convert file to c-source.

SYNOPSIS
file2c [string] [string]

DESCRIPTION
The file2c utility reads a file from stdin and writes it to stdout, converting each byte to its decimal representation on the fly.

If the first [string] is present, it is printed before the data, if the second [string] is present, it is printed after the data.

This program is used to embedd binary or other files into C source files, for instance as a char[].

EXAMPLE
The command:

    date | file2c 'const char date[] = {' ',0};'

will produce:

    const char date[] = {
    83,97,116,32,74,97,110,32,50,56,32,49,54,58,50,56,58,48,53,
    32,80,83,84,32,49,57,57,53,10
    ,0};