Sponsored Content
Full Discussion: Hex editing
Top Forums UNIX for Dummies Questions & Answers Hex editing Post 302149830 by fpmurphy on Saturday 8th of December 2007 12:11:18 AM
Old 12-08-2007
If you really want to convert CRLFs to a space and your file does not contain the string "@@", the following should work

Code:
 tr "\r\n" "@@" < infile | sed 's/@@/ /g'  > outfile

If "@@" is present in your file, you can substitute another unique string to achieve the same result
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Ascii To Hex

How will I display on screen a UNIX ascii file with its HEX equivalent. I want to check whether 0D 0A is coming at the end of the file which I am generating from UNIX. (1 Reply)
Discussion started by: augustinep
1 Replies

2. UNIX for Advanced & Expert Users

Modifying binary file by editing Hex values ?

Hi , i'm using special binary file (lotus notes) and modifying an hexadecimal address range with windows hex editor and it works fine ! The file is an AIX one and i'm forced to transfert (ftp) it before modifying it and re-transfert ! NOW i would do this directly under AIX ! I can... (4 Replies)
Discussion started by: Nicol
4 Replies

3. Shell Programming and Scripting

Looking for a hex character?

Hi guys , i would want to count the concurrences of the 0A hex char in a text file , then if no matches i need to add a 0A at the end of the line. Any ideas? thx.Regards (1 Reply)
Discussion started by: Klashxx
1 Replies

4. Shell Programming and Scripting

Hex Conversion

I need to have my scripts import volume groups and mknod devices files. I have most of the script working but the device file needs to be in the format 0x??0000 (where the question marks are my HEX representations of the volume group number. I have the code below and the output it produces which... (2 Replies)
Discussion started by: insania
2 Replies

5. 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

6. Programming

ascii to hex

Hello guys, i want to convert a text file to hex and have written this code : int main(int argc, char **argv) { ifstream file; string fileName = "CODEZ"; file.open(fileName.c_str()); // oeffen im Text-Modus if(file) {... (5 Replies)
Discussion started by: Kingbruce
5 Replies

7. 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

8. UNIX for Dummies Questions & Answers

How to specify a FS as HEX value in AWK

Hi All, I have one input file seperated with Hex decimal B1 value. And i want to process this file. And iam creating an awk script to process this file. How can I specify the Field seperator as HEX B1 in my awk. Please help. Thanks in advance.:) (2 Replies)
Discussion started by: psk_kumar
2 Replies

9. Shell Programming and Scripting

How to replace with "sed" some hex values by other hex values?

Assume I have a file \usr\home\\somedir\myfile123.txt and I want to replace all occurencies of the two (concatenated) hex values x'AD' x'A0' bytwo other (concatenated) hex values x'20' x'6E' How can I achieve this with the gnu sed tool? Additional question: Is there a way to let sed show... (1 Reply)
Discussion started by: pstein
1 Replies

10. Shell Programming and Scripting

Convert vi editing to text editing

Dear Guru's I'm using Putty and want to edit a file. I know we generally use vi editor to do it. As I'm not good in using vi editor, I want to convert the vi into something like text pad. Is there any option in Putty to do the same ? Thanks for your response. Srini (6 Replies)
Discussion started by: thummi9090
6 Replies
Hex-a-hop(6)															      Hex-a-hop(6)

NAME
hex-a-hop - puzzle game based on hexagonal tiles DESCRIPTION
Hex-a-hop is a puzzle game based on hexagonal tiles. There is no time limit and no real-time element. The objective is simply to destroy all the green hexagonal tiles on each of the 100 levels. As you progress through the game, more types of tiles are introduced which make things more difficult and interesting. USAGE
You can move the character around with the keys Q,W,E,A,S,D, or with the numeric keypad. Alternatively, you can use the mouse and click on the tile you'd like to move to. Use 'U', backspace or the right mouse button to undo mistakes. The 'Esc' key (or middle mouse button) brings up a menu from which you can restart if you get stuck. Your goal is to break all the green tiles. You mainly do this by jumping on them. They will crack when you land on them, and only disinte- grate when you jump off. Try not to trap yourself! During the game, you will be given hints and instructions on what to do. Use the cursor keys or click on the arrows to scroll through the help pages. More pages will be added as you progress through the game, as new tiles will keep appearing. You can choose which level to attempt next from the map screen. Silver levels are ones you've cleared. Black levels are ones you haven't completed yet, but are available to play. There is no time limit and no real-time element, so take as long as you like. SEE ALSO
You can find more about the game on its homepage: http://www.aceinternet.co.uk/~mokona/ In Debian's version, game data is stored in the directory $HOME/.hex-a-hop/. If the environment variable $HOME is not set, it'll use /tmp/ instead. AUTHOR
The game has been written by Tom Beaumont, and is distributed under the GNU General Public License, either version 2 of the License, or (at your option) any later version. Hex-a-hop(6)
All times are GMT -4. The time now is 11:21 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy