02-04-2009
forget it... i'm so brain dead today...
that was on each line....
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
My program would be creating a file, incase of non data from database it would only able to produce 'END, logically it would be file created by oracle in unix.
this file is showing zero byte but actully there are 4 char in file.This is not required, therefore what is command line should be... (0 Replies)
Discussion started by: u263066
0 Replies
2. Programming
Hi,
Can someone explain what is byte padding?
For ex:
struct emp{
char s;
int b;
char s1;
int b1;
long b3;
char s3;
}
What will be the size of this structure?
Thanks (6 Replies)
Discussion started by: naan
6 Replies
3. UNIX for Dummies Questions & Answers
hi,
How to check if a file or files are of zero bytes and if yes, then to print their names?
Ashu (1 Reply)
Discussion started by: er_ashu
1 Replies
4. Shell Programming and Scripting
Please help me in removing the 2nd file :
-rw-rw-rw- 1 fup03a fup03a 9216 Aug 16 00:45 med_delay_log
-rw-rw-rw- 1 fup03a fup03a 0 Aug 16 18:04 (5 Replies)
Discussion started by: miltonkeynesguy
5 Replies
5. Programming
Hi all,
Can anyone advise on how to display the data in a byte variable, i.e can i use printf("%s", vairable_name);?
Cheers (2 Replies)
Discussion started by: dwgi32
2 Replies
6. Shell Programming and Scripting
In my server migration requirement, I need to compare if one file on old server is exactly the same as the corresponding file on the new server.
For diff and comm, the inputs need to be sorted. But I do not want to disturb the content of the file and need to find byte-to-byte match.
Please... (4 Replies)
Discussion started by: krishmaths
4 Replies
7. IP Networking
Hi
I've a pkts trace and I'm performing some test on it. I'd like to figure out also the numbers of total byte in that trace.
Any idea?
thanks in advance
D. (0 Replies)
Discussion started by: Dedalus
0 Replies
8. UNIX for Advanced & Expert Users
My project is based on GSM. Some parameters are represented as bytearray.Can any one tell me wats is the equivalent for it in c (1 Reply)
Discussion started by: carolsanjeevi
1 Replies
9. UNIX for Dummies Questions & Answers
Hello
I created 3 files by:
dd if=/dev/urandom bs=1024 count=1000000 of=./testfile1
dd if=/dev/urandom bs=1024 count=5000000 of=./testfile2
dd if=/dev/urandom bs=1024 count=10000000 of=./testfile3
Now I want to know how to make a change in a specific byte and/or line of theses files? (2 Replies)
Discussion started by: frhling
2 Replies
10. Shell Programming and Scripting
Hi Team,
I'm looking for a command which removes files having 0 byte of having only header line (1 line).
My ETL process generates these files. Few files are not having header, in that case if no data from source, it will be 0 byte and few files are having header, in that case if no data from... (7 Replies)
Discussion started by: ace_friends22
7 Replies
LEARN ABOUT DEBIAN
freebsd-file2c
FILE2C(1) BSD General Commands Manual FILE2C(1)
NAME
file2c -- convert file to c-source
SYNOPSIS
file2c [-sx] [-n count] [prefix [suffix]]
DESCRIPTION
The file2c utility reads a file from stdin and writes it to stdout, converting each byte to its decimal or hexadecimal representation on the
fly. The byte values are separated by a comma. This also means that the last byte value is not followed by a comma. By default the byte
values are printed in decimal, but when the -x option is given, the values will be printed in hexadecimal. When -s option is given, each
line is printed with a leading tab and each comma is followed by a space except for the last one on the line.
If more than 70 characters are printed on the same line, that line is ended and the output continues on the next line. With the -n option
this can be made to happen after the specified number of byte values have been printed. The length of the line will not be considered any-
more. To have all the byte values printed on the same line, give the -n option a negative number.
A prefix and suffix strings can be printed before and after the byte values (resp.) If a suffix is to be printed, a prefix must also be
specified. The first non-option word is the prefix, which may optionally be followed by a word that is to be used as the suffix.
This program is typically used to embed binary files into C source files. The prefix is used to define an array type and the suffix is used
to end the C statement. The -n, -s and -x options are useful when the binary data represents a bitmap and the output needs to remain read-
able and/or editable. Fonts, for example, are a good example of this.
EXAMPLES
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};
BSD
March 22, 2007 BSD