LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices

Reply
 
Search this Thread
Old 06-05-2007, 06:07 AM   #1
alanminor
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
KenJackson
Member
 
Registered: Jul 2006
Location: Maryland, USA
Distribution: Fedora, Arch
Posts: 572

Rep: Reputation: 64
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.
 
  


Reply


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


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

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