The ^M is nothing but carriage Return. In unix, it will be displayed as ^M.
You cannot run these commands on a zipped file.
If you want to avoid, ^M and insert a new line there use below command,
You may need to have enough space to accommodate the new file too.
(I am not good with awk. I just googled to build this command. )
I have a flat file and need to count no of records in the file less the header and the trailer record.
I would appreciate any and all asistance
Thanks
Hadi Lalani (2 Replies)
Hi
I have a file which has ascii , binary, binary decimal coded,decimal & hexadecimal data with lot of special characters (like öƒ.ƒ.„İİ¡Š·œƒ.„İİ¡Š· ) in it. I want to standardize the file into ASCII format & later use that as source .
Can any one suggest a way a logic to convert such... (5 Replies)
Data on my input file :
Ac1n1s1c2n2s2XPd1r1e1t1d2r2e2t2d3r3e3t3d4r4e4t4RT
Bh1k1p1h2k2p2NTq1y1f1m1q2y2f2m2q3y3f3m3q4y4f4m4ZN
and i want the output to be:
Ac1n1s1XPd1r1e1t1RT
Ac1n1s1XPd2r2e2t2RT
Ac1n1s1XPd3r3e3t3RT
Ac1n1s1XPd4r4e4t4RT
Ac2n2s2XPd1r1e1t1RT
Ac2n2s2XPd2r2e2t2RT... (6 Replies)
Hi everyone.
I am a newbie to Linux stuff. I have this kind of problem which couldn't solve alone. I have a text file with records separated by empty lines like this:
ID: 20
Name: X
Age: 19
ID: 21
Name: Z
ID: 22
Email: xxx@yahoo.com
Name: Y
Age: 19
I want to grep records that... (4 Replies)
Hi,
I am having couple of files which i used to copy from windows to Linux, so now in case of text files (CTRL^M) appears at end of line. I know i can convert this windows format file to unix format file by running dos2unix.
My requirement here is that i want to do it automatically using a... (5 Replies)
I have 2 files
"File 1" is delimited by ";" and "File 2" is delimited by "|".
File 1 below (3 record shown):
Doc1;03/01/2012;New York;6 Main Street;Mr. Smith 1;Mr. Jones
Doc2;03/01/2012;Syracuse;876 Broadway;John Davis;Barbara Lull
Doc3;03/01/2012;Buffalo;779 Old Windy Road;Charles... (2 Replies)
Hi all,
I have a input file say record.txt
hostname IP_address Port_No Version
A 10.10.10.1 80 6.02
B 10.10.10.2 81 6.03
C 10.10.10.3 82 6.04
row 1 has 4 field headings : hostname, IP_address, Port_No and Version.
and from 2nd row onwards the actual records start.
now i need to... (2 Replies)
Hello Experts,
Below is the record i have:
sample data attached
I want this record of each row to be in single line and there are multiple rowise unixtime mentioned e.g 11996327 , This needs to be converted to Human readdable data and time from multiple rows
Can you help me , it will be... (10 Replies)
Hi I am new to shell programming in unix
Please if I can provide help.
I have a file structure of a header record and "N" detail records.
The header record will be the total number of detail records
I need to split the file in 2:
One for the header
Another for all detail records
Could... (1 Reply)
Discussion started by: jamcogar
1 Replies
LEARN ABOUT DEBIAN
srec_fairchild
srec_fairchild(5) File Formats Manual srec_fairchild(5)NAME
srec_fairchild - Fairchild Fairbug file format
DESCRIPTION
The Fairchild Fairbug format has 8-byte records. A file begins with an address record and ends with an end-of-file record.
There are three record types in this file format.
Address records are of the form
+--+------+
|S | nnnn |
indicating the address for the following data records. +--+------+
Data records are of the form
+--+------------------+---+
|X | ffffffffffffffff | c |
Each data record begins with an X and always contains+8-data-bytes.--The-ff+characters are hexadecimal byte values (8 bytes). Each data
byte is represented by 2 hexadecimal characters. The c character is a hex digit being the the nibble-sum of the data bytes. A 1-digit
hexadecimal checksum follows the data in each data record. The checksum represents, in hexadecimal notation, the sum of the binary equiva-
lents of the 16 digits in the record; the half carry from the fourth bit is ignored. The programmer ignores any character (except for
address characters and the asterisk character, which terminates the data transfer) between a checksum and the start character of the next
data record. This space can be used for comments.
The end-of-file record has the form
+--+
|* |
The last record consists of an asterisk only, which indicates the end-of file.
Size Multiplier
In general, binary data will expand in sized by approximately 2.4 times when represented with this format.
EXAMPLE
Here is an example Fairchild Fairbug file. It contains the data "Hello, World[rq] to be loaded at address 0x1000. Notice how the last
record is padded with 0xFF bytes.
S1000
X48656C6C6F2C2057C
X6F726C64210AFFFF3
*
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_fairchild(5)