MirBSD manpage: file2c(1)

FILE2C(1)                    BSD Reference Manual                    FILE2C(1)


     file2c - convert file to c-source


     file2c [string] [string]


     The file2c utility reads a file from the standard input and writes it to
     the standard output, 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 embed binary or other files into C source files,
     for instance as a char[].


     The command:

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

     will produce:

           const char date[] = {


     hexdump(1), od(1)

MirBSD #10-current             January 28, 1995                              1

Generated on 2022-12-24 01:00:14 by $MirOS: src/scripts/roff2htm,v 1.113 2022/12/21 23:14:31 tg Exp $ — This product includes material provided by mirabilos.

These manual pages and other documentation are copyrighted by their respective writers; their sources are available at the project’s CVSweb, AnonCVS and other mirrors. The rest is Copyright © 2002–2022 MirBSD.

This manual page’s HTML representation is supposed to be valid XHTML/1.1; if not, please send a bug report — diffs preferred.

Kontakt / Impressum & Datenschutzerklärung