Your Ad Here

Jumat, 09 Agustus 2013

Unix Tip: APPENDING TEXT AT BOTH ENDS

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

UNIX GURU UNIVERSE
UNIX HOT TIP

Unix Tip 3469 - August 9, 2013

http://www.ugu.com/sui/ugu/show?tip.today

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


APPENDING TEXT AT BOTH ENDS

If you need to append some
text to both the ends of a
string in vi, use the
following command in vi:

:/^\(.*\)/s//starttextcomeshere \1 endtextcomeshere/

If "iamworthless" is the text
at the position of the cursor
in the vi editor, the output
of the command:

:/^\(.*\)/s//DONTFEEL \1 ANYTIME/


DONTFEEL iamworthless ANYTIME

As you guessed, "DONTFEEL " and
" ANYTIME" are the strings you
would like to crush
"iamworthless" with. The "\1" is
the variable that stores the
entire pattern searched by
the "/\(.*\)/"



This tip generously supported by: hg_krishnan@yahoo.com



--------------------------------------------------------------------------
To Subscribe: http://www.ugu.com/sui/ugu/show?tip.subscribe
To Unsubscribe: http://www.ugu.com/sui/ugu/show?tip.unsubscribe
To Submit A Tip: http://www.ugu.com/sui/ugu/show?tip.today

==========================================================================
DISCLAIMER: All UNIX HOT TIPS ARE OWNED BY THE UNIX GURU UNIVERSE AND ARE
NOT TO BE SOLD, PRINTED OR USED WITHOUT THE WRITTEN CONSENT OF THE UNIX
GURU UNIVERSE. ALL TIPS ARE "USE AT YOUR OWN RISK". UGU ADVISES THAT
ALL TIPS BE TESTED IN A NON-PRODUCTION DEVELOPMENT ENVIRONMENT FIRST.

Unix Guru Universe - www.ugu.com - tips@ugu.com - Copyright 1994-2001
==========================================================================

Tidak ada komentar:

Posting Komentar

Your Ad Here
Free Automatic Backlink Free Auto Backlink Free Auto Backlink Free Auto Backlink Free Auto Backlink Free Auto Backlink Free Auto Backlink Free Auto Backlink Free Auto Backlink Free Auto Backlink