What's wrong with this part of my script?
I just want to put each column from a fixed length file into a variable so I can validate each field later in the script.
exec< myfile.dat
while read afile; do
a=`echo $(echo $afile |cut -c1-10)`
echo "$a"
b=`echo $(echo $afile |cut -c11-20)`... (12 Replies)
I have a pipe delimited file. I need to check that the first and second fields are 5 characters long and if not i need to append 0 in front of them to make them 5 characters long. can some body let mwe know how i can find the length of the two fields and then make them 5 characters long if they... (6 Replies)
Hello,
I have a text file with n lines in the following format (9 column fields):
Example:
contig00012 149606 G C 49 68 60 18 c$cccccacccccccccc^c
I need to count the number of lower-case and upper-case occurences in column 9, respectively, of the... (3 Replies)
I have a field MPN-BANK-NUMBERO:006,00:N in a file FILE1
How can i display the length of the Bank Number.Any idea ?
The output shud take the following format
FILE 1 6
Where 1 is the starting position and 6 is the Ending position. (9 Replies)
Hello Everyone,
I am stuck with one issue while working on abstract flat file which i have to use as input and load data to table.
Input Data-
------ ------------------------ ---- -----------------
WFI001 Xxxxxx Control Work Item A Number of Records
------ ------------------------... (5 Replies)
i have something like this,
cat filename.txt
hui this si s"dfgdfg" omeone ipaddress="10.19.123.104" wel hope this works
i want to replace only 10.19.123.104 with different ip say 10.19.123.103
i tried this
sed -i "s/'ipaddress'/'ipaddress=10.19.123.103'/g" filename.txt
... (1 Reply)
Hi,
I am new to Unix. Please help me in finding solution for the below scenario.
I have a flat file that contains data like
378633410|3013505414|new_378633410|ALBERT|WALLS|378633410|Rew|||||||
351049045|239|new_351049045|JIM|COOK|351049045|Rew|||||||... (6 Replies)
hai guys,
pick the 1st field and calculate max length.
if suppose max length is 2,
then compare the all records if <2 then add zero's prefix of the record.
for ex:
s.no,sname
1,djud
37,jtuhe
in this max length of the 1st field is 2 right
the output wil be
s.no,sname
01,djud... (6 Replies)
Hi,
Need to replace last field in a file(/etc/passwd) ,if first filed matches with particular username.
Scenario:
cat testfor1
deekshi:x:7082:7082::/home/deekshi:/bin/bash
harini1:x:7083:7083::/home/harini1:/bin/bash
Here,if first field contains "deekshi", then i should replace... (4 Replies)
Each record coming with column names. I have to replace them in each record as shown below
TIME=20181219110000261|CHAN=FMBKHJBAAAADPCFNAAAAAABA|EVNT=SWIclst|VALU=Session FMBKHJBAAAADPCFNAAAAAABA started|SRC=NSS|UCPU=0|SCPU=0
Output should look like: ... (9 Replies)
Discussion started by: sudhakar1987
9 Replies
LEARN ABOUT DEBIAN
srec_tektronix_extended
srec_tektronix_extended(5) File Formats Manual srec_tektronix_extended(5)NAME
srec_tektronix_extended - Tektronix Extended hexadecimal file format
DESCRIPTION
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
Lines always start with a percent (%) character. Each line consists of 5 fields. These are the length field, the type field, the check-
sum, the address field (including address length), and the data field.
The Fields
+--+--------+------+----------+---------+------+
|% | Length | Type | Checksum | Address | Data |
+--+--------+------+----------+---------+------+
Record Length
The record length field is a 2 character (1 byte) field that specifies the number of characters (not bytes) in the record, exclud-
ing the percent, the length field, the type field and the checksum.
Type The type field is a 1 character field that specifies whether the record is data (6) or termination (8).
Checksum
The checksum is an 2 character (1 byte) field that represents the sum of all the nibbles on the line, excluding the checksum.
Address This is a 9 character field. The first character is the address size; it is always 8. The remaining 8 chgaracters are the 4-byte
address that specifies where the data is to be loaded into memory.
Data The data field contains the executable code, memory-loadable data or descriptive information to be transferred.
Record Types
6 A record containing data. The data is placed at the address specified.
8 A termination record. The address field may optionally contain the address of the instruction to which control is passed. There
is no data field.
Size Multiplier
In general, binary data will expand in sized by approximately 2.5 times when represented with this format.
EXAMPLE
Here is an example Tektronix extended file. It contains the data "Hello, World[rq] to be loaded at address 0x006B.
%256D980000006B48656C6C6F2C20576F726C64210A
%09819800000000
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_tektronix_extended(5)