[Linux] Re: kabuk betigi sorusu

---------

New Message Reply About this list Date view Thread view Subject view Author view Attachment view

From: Ozcan Gungor (ozcangungor@hotmail.com)
Date: Tue 07 Jun 2005 - 08:45:12 EEST


Merhaba,

man awk

-v var=val
       --assign var=val
              Assign the value val to the variable var, before execution
of
              the program begins. Such variable values are available to
the
              BEGIN block of an AWK program.

n=3;echo "1 2 6 4" | awk -v t=$n ' { print t}'

Merhaba,

Sanırım sorunuzun cevabı şu olacak:

shell$ a=2; echo "1 2 3 4" | awk "{print \$$a,\$4}"

İyi çalışmalar.

On Mon, Jun 06, 2005 at 04:58:07PM +0300, Aydın ÜSTÜN wrote:
>Asagidaki kabuk betiginde tanimli *n* degiskenini awk icerisine nasil
>alabilirim? Bu sekliyle *n *degerini yazdiramadim.
>
>*n*=1
> ...... | awk '{print *n*,$4}'

_________________________________________________________________
Sohbet ve eglence, web kamera ve sesli sohbet Messenger'de.
http://messenger.msn.com/?mkt=tr&DI=3490&XAPID=2584

_______________________________________________
Linux mailing list
Linux@liste.linux.org.tr
http://liste.linux.org.tr/mailman/listinfo/linux


New Message Reply About this list Date view Thread view Subject view Author view Attachment view

---------

Bu arsiv hypermail 2.1.2 tarafindan uretilmistir.