Jeremy Huntwork wrote:

> Um, did you guys miss my post earlier in this thread that had a sed
> option much like this one?  

No.  We were just discussing options.

> " Not sure if it's better, but it's shorter:
> 
> sed -i '[EMAIL PROTECTED]/\* \(.*BYTE.*\) \*/@\1@' \
>     include/freetype/config/ftoption.h "

or,
  sed -ir 's:.*(#.*BYTE.*).*:\1:' \
     include/freetype/config/ftoption.h

which is even shorter.  :)

This only uses one backslash.  I personally try to avoid at signs in
seds.  They just don't look right to me, but that's just a personal thing.

There is also the option of:

pushd include/freetype/config
sed -ir 's/.*(#.*BYTE.*).*/\1/' ftoption.h
popd

This puts the sed all on on one line and uses an additional construct
that users might not use regularly.  Total lines are more though and it
makes it bash dependent.

  -- Bruce
-- 
http://linuxfromscratch.org/mailman/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to