*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->FreeBSD man pages -> file2c (1)              
Title
Content
Arch
Section
 

FILE2C(1)

Contents


NAME    [Toc]    [Back]

     file2c -- convert file to c-source

SYNOPSIS    [Toc]    [Back]

     file2c [string] [string]

DESCRIPTION    [Toc]    [Back]

     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 embed binary or other files into C source files,
     for instance as a char[].

EXAMPLES    [Toc]    [Back]

     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};


FreeBSD 5.2.1		       January 28, 1995 		 FreeBSD 5.2.1
[ Back ]
 Similar pages
Name OS Title
entrigraph Linux convert C source code to use trigraphs
colldef FreeBSD convert collation sequence source definition
ctags Tru64 Makes a tags file for source file objects.
readcomponent IRIX sets the component source within the framebuffer source for pixels that various routines read, useful primaril
chilight Linux highlight a C source file
mkcatdefs Tru64 Preprocesses a message source file
cobfusc Linux make a C source file unreadable but compilable
style FreeBSD kernel source file style guide
style OpenBSD Kernel source file style guide (KNF)
mkstr HP-UX extract error messages from C source into a file
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service