[LUGOS] presledek -> _

Gregor GORJANC gregor.gorjanc at bfro.uni-lj.si
Thu Apr 28 12:44:17 CEST 2005


Vcasih je dobro, da pred "posebnim" znakom kot je presledek uporabis \ npr.

's/\ /_/'

s tem zagotovis, da se "posebni" znak tretira kot znak in ne kot kaj drugega.

V zanki spodaj manjka na koncu se done.

Bostjan Tursic wrote:
> Sam sebi odgovarjam: Verjetno ni najbolj elegantno ampak dela ;)
>  
> for file in *.jpg; do
>     X=$(echo $file | sed -e 's/ /_/')
> mv "$file" $X
>  
> Bostjan
> 
>     ----- Original Message -----
>     *From:* Bostjan Tursic <mailto:seznami at tursic.org>
>     *To:* lugos-list at lugos.si <mailto:lugos-list at lugos.si>
>     *Sent:* Thursday, April 28, 2005 11:53 AM
>     *Subject:* [LUGOS] presledek -> _
> 
>      
>     Kako naj zamenjam presledek v imenu fajla za _ ?
>     (za 100 fajlov v direktoriju, se pravi for file in ...)
>      
>     lp
>     Bostjan
>      
> 
>     ------------------------------------------------------------------------
> 
>     _______________________________________________
>     lugos-list mailing list
>     lugos-list at lugos.si <mailto:lugos-list at lugos.si>
>     http://liste2.lugos.si/cgi-bin/mailman/listinfo/lugos-list
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> lugos-list mailing list
> lugos-list at lugos.si
> http://liste2.lugos.si/cgi-bin/mailman/listinfo/lugos-list

-- 
Lep pozdrav / With regards,
     Gregor Gorjanc

----------------------------------------------------------------------
University of Ljubljana
Biotechnical Faculty        URI: http://www.bfro.uni-lj.si/MR/ggorjan
Zootechnical Department     mail: gregor.gorjanc <at> bfro.uni-lj.si
Groblje 3                   tel: +386 (0)1 72 17 861
SI-1230 Domzale             fax: +386 (0)1 72 17 888
Slovenia, Europe
----------------------------------------------------------------------
"One must learn by doing the thing; for though you think you know it,
  you have no certainty until you try." Sophocles ~ 450 B.C.
----------------------------------------------------------------------


More information about the lugos-list mailing list