Hello Rahmat,

Thursday, May 25, 2006, 11:45:51 AM, you wrote:

> On 25 May 2006 07:41:51 +0700
> Yanu Widodo <[EMAIL PROTECTED]> wrote:

>> Pagi,
>> Apa khabar semua ?!
>> 
>> Linux memang sangat menarik, 
>> semakin diperdalam, semakin mengasyikkan.
>> 
>> btw, 
>> 
>> 1. kalo di notepad (Xp) untuk nge-replace, saya biasa make CTRL+H
>> kalo di VI gimana ya?
>> 
>> 
>> 2. Misalnya di sebuah file "text.txt" ada string "eksplorasi", dan saya
>> mo ganti dengan "exploration". Apakah ada command tertentu untuk
>> melakukannya dari terminal ?! Misalnya : 
>> 
>> $ command eksplorasi exploration text.txt

> coba jawab:

> 1. bisa tekan tombol insert 2x anda akan masuk ke mode replace


> 2. $ cat test.txt
>         eksplorasi
>         test
>         test    
>         eksplorasi
>         eksplorasi
>         eksplorasi

>    $ perl -pi -e 's/eksplorasi/exploration/' text.txt
>    
>    $ cat text.txt
>         exploration
>         test
>         test
>         exploration
>         exploration
>         exploration



>  

di vi ketik ESC
trus... ketik ini
:g/test/s//eksplorasi/g

perintah di atas akan meReplace semua kata test dengan kata explorasi
lengkap ada di vim atau man vim

Nyoman.                     

Attachment: pgpEEbWfkfWfS.pgp
Description: PGP signature

Kirim email ke