bash for loop

K Efstathiou cefstat at phys.uoa.gr
Sun Mar 11 16:06:01 EET 2001


Διαφορετικά

for i in `seq 1 10`; do tar xvf file$i.tar; done

Στις Κυρ 11 Μαρ 2001 15:17, γράψατε:
> On Sat, 10 Mar 2001, Alex wrote:
> > Erwthsh gia bash:
> >
> > 8elw na kanw, px, untar 10 tar files pou onomazontai fileN.tar
> >
> > anti gia to ekshs aparadekto (pou einai axrhsto gia megala plh8h):
> >
> > for i in 1 2 3 4 5 6 7 8 9 10
> > do
> > tar xvf file$i.tar
> > done
> >
> > pws mporw na exw ena pio chic iteration loop sto for statement?
> >
> > kati tou styl for(i=0;i<10;i++) ths C++ psaxnw
> >
> > TIA
> >
> > Alexandros
>
> kane kati se bash:
>
> for tarfile in file*.tar; do
>   tar xvf $tarfile
> done
>
> Pws to blepeis?
>
> Tassos
>
> PS: se exei ephreasei h C...



More information about the Linux-greek-users mailing list