Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 06-05-2007, 06:07 AM   #1
LQ Newbie
Registered: Jun 2007
Location: New Zealand
Posts: 1

Rep: Reputation: 0
Question Basic ASCII text processing

Hi, I often find I need to process text that has NO line endings. I want to insert these so I can use standard tools such as sed, awk, grep etc.

Typically the data is fixed length records BUT has a corruption, so not so easy.

Ideally I want to find a tool that will replace a string with another string in a big file with no record delimiters (without trying to read the current "line"). That's all.

There must be a way!
Old 06-05-2007, 06:40 AM   #2
Registered: Jul 2006
Location: Maryland, USA
Distribution: Fedora, PCLinuxOS
Posts: 648

Rep: Reputation: 84
The GNU sed manual says "GNU sed has no built-in limit on line length; as long as it can malloc() more (virtual) memory, you can feed or construct lines as long as you like."

Also, the cut command can be used with -b to specify locations by the byte offset.

I have also used emacs to edit binary files, so it should work interactively. Just be sure to put it in fundamental mode (M-x fundamental-mode) not text mode so it doesn't wrap.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
text processing, maintaining a log jonhewer Linux - Newbie 9 08-25-2005 02:24 AM
text to ascii tekmorph Programming 8 10-24-2004 09:57 AM
text editingor processing exodist Linux - General 2 11-29-2003 10:24 PM
text processing Gantrep Linux - General 4 02-17-2003 10:37 PM
Displaying a text file in ascii?? bauld Linux - General 4 11-21-2001 07:33 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:10 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration