Hi,
I am new to scripting. I need a script to sort and the records in a file and then split them into different files.
For example, the file is:
H1......................
H2......................
D2....................
D2....................
H1........................... (15 Replies)
Hi, I am trying to parse a very long record in a text file into multiple records by checking ADD, DELETE, or MODIFY field value in a shell script.
Input
# File name xyz.txt
ADD|N000|8015662|DELETE|N001|9915662|MODIFY|N999|85678
Output
ADD|N000|8015662|
DELETE|N001|9915662|... (8 Replies)
Hi,
I am creating a script to do a find and replace single/multiple lines in a file with any number of lines.
I have written a logic in a script that reads a reference file say "findrep" and populates two variables $FIND and $REPLACE
print $FIND gives
Hi How r $u
Rahul()
Note:... (0 Replies)
Hi All,
I have a *.csv files in a die /pro/lif/dow, (pipe delimiter file), these files are having 8 columns and 6 column(CDR_LOGIC) records are populated as below, I need to incorporate the below logic in all the *.csv files.
11||:ColumnA||:ColumnB
123||:ColumnA
IIF(:ColumnA = :ColumnC then... (6 Replies)
Hi,
I have a requirement with,
No~Dt~Notes
1~2011/08/1~"aaa
bbb
ccc
ddd
eee
fff
ggg
hhh"
Single column alone got splitted into multiple lines.
I require the output as
No~Dt~Notes
1~2011/08/1~"aaa<>bbb<>ccc<>ddd<>eee<>fff<>ggg<>hhh"
mean to say those new lines to be... (1 Reply)
Hi Friends,
source
....
col1,col2,col3
a,b,1;2;3
here colom delimeter is comma(,).
here we dont know what is the max length of col3 means now we have 1;2;3 next time i will receive 1;2;3;4;5;etc...
required output
..............
col1,col2,col3
a,b,1
a,b,2
a,b,3
please give me... (5 Replies)
Hi All,
I am trying to split a record into multiple records based on a value.
Input.txt
"A",1,0,10
"B",2,0,10,15,20
"C",3,11,14,16,19,21,23
"D",1,0,5
My desired output is:
"A",1,0,10
"B",2,0,10
"B",2,15,20
"C",3,11,14
"C",3,16,19
"C",3,21,23 (4 Replies)
I need to make one record to multiple records based on occurence column in the record and change the date.For example below first record has 5 ,so need to create 5 records from one and change the date to 5 months.Occurence can be any number.
I am unable to come with a script.Can some one help
... (5 Replies)
Hello All,
I have a large file, more than 50,000 lines, and I want to split it in even 5000 records. Which I can do using
sed '1d;$d;' <filename> | awk 'NR%5000==1{x="F"++i;}{print > x}'Now I need to add one more condition that is not to break the file at 5000th record if the 5000th record... (20 Replies)
Hi,
I have one tab delimited file which is having multiple store_ids in first column seprated by pipe.I want to split the file on the basis of store_id(separating 1st record in to 2 records ).
I tried some more options like below with using split,awk etc ,But not able to get proper output. can... (1 Reply)
Discussion started by: jaggy
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)