• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Modifying text in a large file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Modifying text in a large file


  • Subject: Re: Modifying text in a large file
  • From: Rob Stott <email@hidden>
  • Date: Mon, 20 Oct 2003 17:04:29 +0100

On 20 Oct 2003, at 16:11, Deivy Petrescu wrote:

On Monday, Oct 20, 2003, at 09:27 US/Eastern, christian vick wrote:

I want to search a string and then replace the entire line with another
string (or delete the line). This in a large text file (50 MB)....


Read "man sed"
If necessary you can create a file of things to change. It is extremely fast.



Hi Christian

I had a similar problem and dealt with it in the same way Deivy suggests. I'd recommend it, its remarkably quick. There's a good tutorial at...

http://www.osxfaq.com/Tutorials/LearningCenter/

...its much easier than trying to figure stuff out via the man pages. Look up the sections on 'sed' and 'grep' for help with searching / searching and replacing.

You can do some pretty powerful things if you fancy having a dabble with Perl too, if you're feeling brave!

r.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Modifying text in a large file (From: Deivy Petrescu <email@hidden>)

  • Prev by Date: Re: Modifying text in a large file
  • Next by Date: Re: Quark image import script problem
  • Previous by thread: Re: Modifying text in a large file
  • Next by thread: Problem running Common Lisp image from AppleScript
  • Index(es):
    • Date
    • Thread