|
Re: One more on sort order...: msg#00071hardware.voyetra.audiotron
Well, why do it in an editor? :-) Provided your sed knows about extended regexps ("egrep(1)-style regexps"), i.e. it has the "-E" switch or equivalent, you can use this: mv atrontc.vtc atrontc.bak && \ sed -E \ -e 's/^(TALB|TPE1|TIT2)=([Aa]n?|[Tt]he) (.*)$/\1=\3, \2/' \ < atrontc.bak \ > atrontc.vtc If you must use the vi editor, you'll need one that likewise knows about extended regexps. With "nvi" (which is the default vi in NetBSD, possibly other modern BSD's as well) you can get egrep(1)-style regular expressions with :set extended Older vi's only do simpler regular expressions, most notably the pipe character is not available to indicate alternatives. With "set extended" you could use this in vi command mode: :%s/^(TALB|TPE1|TIT2)=([Aa]n?|[Tt]he) (.*)$/\1=\3, \2/ Regards, + Kim | From: Mike Scott <michaelt@xxxxxxxxx> | Date: Mon, 08 Mar 2004 12:00:58 -0500 | | If your VI has this kind of regular expression facility, you probably can | do this with it. Otherwise, like the other guy said, you can learn some | Perl and modify iToc to do it. 8^) ----------------------------------------------------------- List archives: http://maillist.voyetra.com/audiotron.html You may leave the list at any time by sending an e-mail to LISTSERV@xxxxxxxxxxxxxxxxxxxx with only the words "SIGNOFF AUDIOTRON" in the body of the e-mail. Separate Message Board available at: http://www.turtle-beach.com/wb/messageboard.htm ----------------------------------------------------------- |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: One more on sort order...: 00071, Mike Scott |
|---|---|
| Next by Date: | Re: The insides..: 00071, Sean Hafeez |
| Previous by Thread: | Re: One more on sort order...i: 00071, Mike Scott |
| Next by Thread: | Re: One more on sort order...: 00071, Sean Hafeez |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |