• 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: Search and replace with Unix commands
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Search and replace with Unix commands


  • Subject: Re: Search and replace with Unix commands
  • From: Emmanuel LEVY <email@hidden>
  • Date: Thu, 5 Aug 2010 02:38:08 +0200

I recommend the "change" command in Satimage osax.

I would try something like:

change "^[\\r\\n]+" & searchstring into replacementstring & "\\0" in alias "Macintosh HD:file:path" with regexp

Emmanuel



Hi,

I need to search a string like '\rJohn' or '\nJohn' with another string
All the unix command (Sed, Awk...) works one line at time and the separator is usually LF.
How can I search and replace, not using pure AS because some text file are really bigger?
I would like to use do shell script using cat to read the file and some Unix command to search empty line followed by my string and replace them with something else.


Mark



_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (applescript- email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users


This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. AppleScript-Users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
References: 
 >Search and replace with Unix commands (From: Hagimeno <email@hidden>)

  • Prev by Date: Re: List oddity
  • Next by Date: Re: Search and replace with Unix commands
  • Previous by thread: Search and replace with Unix commands
  • Next by thread: Re: Search and replace with Unix commands
  • Index(es):
    • Date
    • Thread