10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a long string of hex (from ASN.1 data) where I need to find and change a particular hex value only and increment it. The hex pairs either side (84 and a7) of the value to increment will remain constant.
i.e. "84 <length> <value_to_increment> a7" starting with 00.
So end result:
... (11 Replies)
Discussion started by: securegooner
11 Replies
2. UNIX for Dummies Questions & Answers
Dear all,
I want to offset the file numbers. can you please make some awk code or linux code for the same.
Example:
input file names
ANI_WFMASS_PIST00001.gif
ANI_WFMASS_PIST00002.gif
.
.
.
ANI_WFMASS_PIST0000n.gif
offset --> 30
ANI_WFMASS_PIST00031.gif
ANI_WFMASS_PIST00032.gif... (14 Replies)
Discussion started by: kri321shna
14 Replies
3. UNIX for Advanced & Expert Users
Hi,
I am trying to get the position of a repeated string in a line using
grep -b -o "pattern"
In my server I am using GNU grep version 2.14 and the code is working fine. However when I am deploying the same code in a different server which is using GNU grep version 2.5.1 the code is not... (3 Replies)
Discussion started by: Subhamoy
3 Replies
4. Shell Programming and Scripting
Hi ,
I have a .gz file whose contents look like below.
data1^filename1
data2^filename2.
..
.
.
Is it possible to find out the byte offset of each record from the .gz file.
Like in an uncompressed file.
grep -nb "Filename" give the byte offset of the record in this case.
... (4 Replies)
Discussion started by: chetan.c
4 Replies
5. Programming
Hi,
Is there really a difference between these two, std::hex and ios::hex??
I stumbled upon reading a line, "std::ios::hex is a bitmask (8 on gcc) and works with setf(). std::hex is the operator". Is this true?
Thanks (0 Replies)
Discussion started by: royalibrahim
0 Replies
6. Shell Programming and Scripting
Hi,
I'm looking for a way (other than C) to pull out a number of bytes in a Linux file for a giving length. for example:
file1 contains 2 records:
abcdefghijkl
mnopqrstuv
.....
so, I want to pull starting in byte 9 for a length of 8
file2 would contain:
ijkmnopq
Thanks (2 Replies)
Discussion started by: jbt828
2 Replies
7. UNIX for Dummies Questions & Answers
i know how to add two numbers using expr,
but if i have a file with hundreds of numbers, how do i add them all together, without typing them all one by one?
for example, file.txt contains
4
5
6
7
how can i give a command to add them, without typing
$ expr `4 + 5 + 6 + 7` (7 Replies)
Discussion started by: FOBoy
7 Replies
8. Programming
Hi All,
My main intension of is to convert the Hexstring stored in a char* into hex and then prefixing it with "0x" and suffix it with ','
This has to be done for all the hexstring char* is NULL.
Store the result prefixed with "0x" and suffixed with ',' in another char* and pass it to... (1 Reply)
Discussion started by: rvan
1 Replies
9. UNIX for Dummies Questions & Answers
Hi,
I want to read a file from a specified offset from the start of file. With the read command, is it possible to do so. Please suggest. Is there any other alternative?
Thanks,
Saurabh (2 Replies)
Discussion started by: saurabhsinha23
2 Replies
10. UNIX for Advanced & Expert Users
Hi All,
I need to extract only XML details from large log file which may contain other unwanted junk details.
For example, our xml will be start as <OUTBOUND_MESSAGE .....> and ends with </OUTBOUND_MESSAGE>. I want to extract only lines between these start and end tag (Including these tags)... (5 Replies)
Discussion started by: thinakarmani
5 Replies