Sponsored Content
Top Forums UNIX for Dummies Questions & Answers How to specify a FS as HEX value in AWK Post 302550004 by alister on Wednesday 24th of August 2011 11:23:04 AM
Old 08-24-2011
When the value of FS is more than one character, AWK interprets it as a regular expression. AWK regular expressions support an octal escape sequence. If you can convert to octal, the following should work portably: awk -F'\261' ...

(base 16) B1 == (base 8) 261

Regards,
Alister
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

AWK and hex sequences

for file in `seq 1 256`; do printf "\x$file -- $file" ; done ; printf "\n" produces the wrong output. I want to show the ascii codes but need to output a hexidecimal number sequence. I know I should use awk to do this but i'm not sure how cause I forget. what is the awk equivelant of seq... (5 Replies)
Discussion started by: JoeTheGuy
5 Replies

2. Shell Programming and Scripting

Covert Deci to Hex (New to AWK)

Hi, I am very new to awk and would be grateful for your help. I need to convert a file with details like this, Wregister( 45676, 0) Wregister( 55550, 1) Wregister( 44000, 0) FlipFlop( 2342, 2) . . to look like this Wregister(626C, 0) Wregister(D8FE, 1) Wregister(ABE0, 0)... (7 Replies)
Discussion started by: Linda_H
7 Replies

3. Programming

After converting the hexstr to Hex and storing the Hex in a char*

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

4. Programming

What is the difference between ios::hex and std::hex?

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

5. Shell Programming and Scripting

awk to remove leading zeros for a hex number

Is it possible by using awk to remove leading zeros for a hex number? ex: 0000000011179E0A -> 11179E0A Thank you! (4 Replies)
Discussion started by: carloszhang
4 Replies

6. Shell Programming and Scripting

Range of numbers in HEX using AWK

Hi , How do i found out all the number in a range ( HEX) for example Input is 15CF:15D2 Output needed 15CF 15D0 15D1 15D2 Thanks (2 Replies)
Discussion started by: greycells
2 Replies

7. Shell Programming and Scripting

how to get data from hex file using SED or AWK based on pattern sign

I have a binary (hex) file I need to parse to get some data which are encoded this way: .* b4 . . . 01 12 .* af .* 83 L1 x1 x2 xL 84 L2 y1 y2 yL By another words there is a stream of hexadecimal bytes (in my example separated by space for better readability). I need to get value stored in... (3 Replies)
Discussion started by: sameucho
3 Replies

8. Shell Programming and Scripting

awk to compare hex number

$ awk 'BEGIN{ pat111=0x1000000002E3E02; snBegin=0x1000000002E3E01; if (pat111<=snBegin) printf "a\n"}' a Result is not correct. Looks like the number is too big. Any idea? Thx! Please use code tags <- click the link! (2 Replies)
Discussion started by: carloszhang
2 Replies

9. HP-UX

Replacing Hex Characters In A File Using awk?

Hi guys, First off, i'm a complete noob to UNIX and LINUX so apologies if I don't understand the basics! I have a file which contains a hex value of '0D' at the end of each line when I look at it in a hex viewer. I need to change it so it contains a hex value of '0D0A0A' I thought... (10 Replies)
Discussion started by: AndyBSG
10 Replies

10. Shell Programming and Scripting

Print hex Ip address in decimal format inside awk script

Hi to all, May someone help me with the following. The awk script below is part of a bigger awk script, and this part attempts to print an Ip address that is in hex format in decimal format. I'm trying with following code but I'm getting 0.0.0.0 and the correct answer is 192.168.140.100 ... (9 Replies)
Discussion started by: Ophiuchus
9 Replies
GITVIEW(1)                                                    General Commands Manual                                                   GITVIEW(1)

NAME
gitview - An ASCII/HEX file viewer SYNOPSIS
gitview [-hvcblp] file DESCRIPTION
This manual page documents briefly the gitview command. gitview is an ASCII/HEX file viewer. Use the `arrows', `PageUp', `PageDown', `Home', `End', `^N', `^P', `^V', `ESC v', `Space' and `Backspace' to move in the file, `^L' to refresh the screen and `F10', `q' or `^X ^C' to leave. More extensive documentation on gitview and the other gnuit tools is available in info format, try 'info gnuit'. You can change these keys, just read the GITVIEW-Setup, GITVIEW-Color, GITVIEW-Monochrome and GITVIEW-Keys sections in the configuration files gnuitrc.TERM. gitview is part of git(1), the GNU Interactive Tools. OPTIONS
A summary of options is included below. For a complete description, see the Info files. -h Show summary of options. -v Show version of program. -c Use ANSI colours. -b Don't use ANSI colours. -l Don't use last screen character. SEE ALSO
gitfm(1) gitview and gitfm are documented fully by GNU Interactive Tools, available via the Info system. BUGS
Please send bug reports to: gnuit-dev@gnu.org AUTHORS
Tudor Hulubei <tudor@cs.unh.edu> Andrei Pitis <pink@pub.ro> Ian Beckwith <ianb@erislabs.net> (Current maintainer) Sep 30, 2007 GITVIEW(1)
All times are GMT -4. The time now is 02:46 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy