• 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: piping sed to sed commands
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: piping sed to sed commands


  • Subject: Re: piping sed to sed commands
  • From: Gnarlodious <email@hidden>
  • Date: Sat, 17 Jan 2004 13:07:20 -0700

Entity teatime spoke thus:

> confusing escaped escape slashes



> no reason to pipe 7 commands to get the results. sed can handle lots of
> commands at once.
>
> Let's try it this way
>
> sed -n -e 's|1|1a|p' -e 's|2|2a|p' -e 's|3|3a|p' -e 's|4|4a|p' -e
> 's|5|5a|p' -e 's|6|6a|p' -e 's|7|7a|p' file
>
> the "-n" says do not print lines to stdout by default
> the "p" at then end of each substitute command says "print the current
> line"
>
> teatime 13 % sed -n -e 's|.*<key>Name</key><string>\(.*\)</string>|<td
> class=Name>\1|p' -e 's|.*<key>Artist</key><string>\(.*\)</string>|<td
> class=Artist>\1|p' plist
> <td class=Name>Rock Me Right
> <td class=Artist>Susan Tedeschi
>
> 8)
> ----------------------------------
> Chris Janton - face at CentosPrime dot COM
> Netminder for Opus1.COM
> _______________________________________________
> 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.
_______________________________________________
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: piping sed to sed commands (From: Chris Janton <email@hidden>)

  • Prev by Date: Re: Piping sed to sed commands
  • Next by Date: Re: Piping sed to sed commands
  • Previous by thread: Re: piping sed to sed commands
  • Next by thread: latitude & longitude
  • Index(es):
    • Date
    • Thread