On Sat, 2010-11-06 at 09:20 -0600, Scott wrote:
> On Fri, Nov 05, 2010 at 04:37:09PM +0000, Andrew Benton wrote:
> >
> > sed -i '/ase --o/s/ \{8\}/\t/' docs/{gst,libs,plugins}/Makefile.in
> ^^^^^^^^^
>
> Andy,
>
> I am trying to learn sed, I don't quite understand the portion I have
> hilighted. Would you mind explaining this to me?It's clearer if you read it as two pieces, a simple pattern match, followed by a substitution to be performed on lines matching the first pattern. So, "/ase --o/" simply means match any line containing the string "ase --o". Then on each such line, we apply the second piece, replacing 8 spaces with a tab character. If you want to learn sed, I'd suggest reading some of the docs on this page, particularly the one-liners and of course the man page. http://sed.sourceforge.net/ Simon.
signature.asc
Description: This is a digitally signed message part
-- http://linuxfromscratch.org/mailman/listinfo/blfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page
