Formatting File having big single line into 95 Char Per Line
Hi All,
I have 4 big files which contains one big line containing formatted character records, I need to format each file in such way that each File will have 95 Characters per line. Last line of each file will have newline character at end.
I have my data something like this
SERIAL FIRSTOCCURRENCE
NETPROTOCOL
1947430693 07/01/2009 05:16:40
FR
SERIAL FIRSTOCCURRENCE
NETPROTOCOL
1947430746 07/01/2009 05:18:05
FR
I want the output as follows.... (1 Reply)
Hi
I m having ifconfig -a o/p like
sbanlab1:ksh# ifconfig -a | egrep "flags|inet" | awk -F' ' '{print $1,$2}'
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL>
inet 127.0.0.1
lo0:1: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL>
inet 127.0.0.1
bge0:... (1 Reply)
Hello,
Need help substituting a particular word in a file having a single line but no newline character at the end.
I was trying to use sed but it doesn't work probably because there is no newline char at the end of the line.
$ cat hlq_detail
/outputs/alvan23/PDFs/bills
$ cat... (5 Replies)
I have several hundreds of tiny files which need to be concatenated into one single line and all those in a single file. Some files have several blank lines. Tried to use this script but failed on it.
awk 'END { print r } r && !/^/ { print FILENAME, r; r = "" }{ r = r ? r $0 : $0 }' *.txt... (8 Replies)
I have a file, I need to remove the first character of each line, but only if it's a comma. I don't want to delete any other commas in each line.
Trying cat or sed but I really don't know them very well, would love some help.
This removes the first comma, but it removes the first comma no... (6 Replies)
here is what i want to achieve.. i have a file with below contents
cat fileName
blah blah blah
.
.DROP this
REJECT that
.
--sport 7800 -j REJECT --reject-with icmp-port-unreachable
--dport 7800 -j REJECT --reject-with icmp-port-unreachable
.
.
.
more blah blah blah
--dport 3306... (14 Replies)
Hi Gurus,
I need separate one file which is one huge line to mutiple line.
file like
abcd # bcd # def # fge # ged
I want to get
abcd
bcd
def
fge
ged
Thanks in advance (4 Replies)
example of problem:
when I echo "$e" >> /home/cogiz/file.txt
result prints to file as:AA
BB
CC
I need it to save to file as this:AA BB CC
I know it's probably something really simple but any help would be greatly appreciated.
Thank You.
Cogiz (7 Replies)
I wish to generate output of two commands in the same line separated by a single white-space.
Below is my command and output in the same line.
ls -ltr fname1.out | awk '{$2=$4=$5=x; print}' | tr '\n' '\t' | tr -s ' '; cksum<fname1.out | cut -d' ' -f1
Output:
-rw-r--r--. root Aug 26 16:57... (6 Replies)
Discussion started by: mohtashims
6 Replies
LEARN ABOUT DEBIAN
srec_ti_tagged
srec_ti_tagged(5) File Formats Manual srec_ti_tagged(5)NAME
srec_ti_tagged - Texas Instruments Tagged (SDSMAC) file format
DESCRIPTION
This format is also known as the TI-Tagged or TI-SDSMAC format.
This format allows binary files to be uploaded and downloaded between two computer systems, typically between a computer system (such as a
PC, Macintosh, or workstation) and an emulator or evaluation board for microcontrollers and microprocessors.
The Lines
Unlike many other object formats, the lines themselves are not especially significant. The format consits of a number of tagged fields,
and lines are composed of a series of these fields.
Tag Description
-------------------------------------
* Data byte.
: End of file.
0 File header (optional).
7 Checksum.
8 Dummy checksum (ignored).
9 Address.
B Data word.
F End of data record.
K Program identifier (optional).
Data Byte
+--+---+---+
|B | n | n |
One byte of data. The nn is 8-bit big-endian hexadecimal. +--+---+---+
End of File
+--+------+
|: | CRLF |
The end of data is indicated by this tag. The end of line sequence+(LF-on+Unix systems, CRLF on PCs) follows this tag.
File Header
+--+--------+----------+
|0 | length | filename |
The optional start-of-file record begins with a tag character-('0')-and-a-12-character file header. The first four characters are the byte
count of the file data. The remaining 8 characters are the name of the file and may be any ASCII characters, blank padded.
Checksum
+--+---+---+---+---+
|7 | n | n | n | n |
The checksum is the 2s complement sum of the 8-bit ASCII values+of-characters,-beginning with the first tag character and ending with the
checksum tag character (7). The nnnn is 16-bit big-endian hexadecimal.
Dummy Checksum
+--+---+---+---+---+
|8 | n | n | n | n |
The checksum is the 2s complement sum of the 8-bit ASCII values-of-characters, beginning with the first tag character and ending with the
checksum tag character (8). The nnnn is 16-bit big-endian hexadecimal.
Address
+--+---+---+---+---+
|9 | n | n | n | n |
Addresses may be given for any data byte, but none is mandatory.--The-file-begins at 0000 if no address is given before the first data
field. The nnnn is 16-bit big-endian hexadecimal.
Data Word
+--+---+---+---+---+
|B | a | a | b | b |
Two bytes of data. The aa and bb are each 8-bit big-endian hexadecimal.---+---+
End of Record
+--+------+
|F | CRLF |
The end of line sequence (LF on Unix systems, CRLF on PCs) is escaped-using this tag. The checksum is reset to zero at this point.
Program Identifier
+--+---+---+---+---+------+
|K | n | n | n | n | text |
The program identifier can contain a brief description-of+the+program,-or-can be empty (i.e. the text portion is optional). The nnnn
length (hex) of the field includes the `K', the length and the text; it is at least 5.
Size Multiplier
In general, binary data will expand in sized by approximately 2.9 times when represented with this format.
EXAMPLE
Here is an example TI-Tagged file. It contains the data "Hello, World[rq] to be loaded at address 0x0100.
K000590080B4865B6C6CB6F2CB2057B6F72B6C64*0A7F648F
:
and here is another example from the reference below
00050 7FDD4F
90000BFFFFBFFFFBFFFFBFFFFBFFFFBFFFFBFFFFBFFFF7F400F
90010BFFFFBFFFFBFFFFBFFFFBFFFFBFFFFBFFFFBFFFF7F3FFF
90020BFFFFBFFFFBFFFFBFFFFBFFFFBFFFFBFFFFBFFFF7F3FEF
90030BFFFFBFFFFBFFFFBFFFFBFFFFBFFFFBFFFFBFFFF7F3FDF
90040BFFFFBFFFFBFFFFBFFFFBFFFFBFFFFBFFFFBFFFF7F3FCF
:
SEE ALSO
http://www.dataio.com/pdf/Manuals/Unifamily/981-0014-016.pdf (page 6-33)
COPYRIGHT
srec_cat version 1.58
Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Peter Miller
The srec_cat program comes with ABSOLUTELY NO WARRANTY; for details use the 'srec_cat -VERSion License' command. This is free software and
you are welcome to redistribute it under certain conditions; for details use the 'srec_cat -VERSion License' command.
AUTHOR
Peter Miller E-Mail: pmiller@opensource.org.au
//* WWW: http://miller.emu.id.au/pmiller/
Reference Manual SRecord srec_ti_tagged(5)