On May 23, 2014, at 09:03, Steven Klein <[email protected]> wrote:
> I have an XML file that's perhaps 1000 lines long.
> ...
> I want to delete everything in that document except the paths themselves, and
> I only need 1 instance of each path, starting with the name of the hard drive.
______________________________________________________________________
Hey Steven,
You can't remove duplicates with a simple regular expression, but it's easy to
do with a text filter.
Here's one example:
#!/bin/bash
sed -En '/\/Volumes\//{
s!.*/Volumes/(.+)</string>.*!\1!
p
}' | uniq;
--
Best Regards,
Chris
--
This is the BBEdit Talk public discussion group. If you have a
feature request or would like to report a problem, please email
"[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>
---
You received this message because you are subscribed to the Google Groups
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].