[LUGOS] bash skripta za brisanje *.tmp

Jernej Simoncic jernej.listsonly at ena.si
Wed Jan 5 14:55:07 CET 2005


On Wednesday, January 5, 2005, 11:50:11, Nejc Škoberne wrote:

> No, ravnokar sem ugotovil, da sintaksa:
> for file in "`locate expr`"
> pa lepo deluje.

Ne bi smela - dvojni narekovaji pomenijo, da se celoten rezultat `locate expr`
vrne kot 1 spremenljivka - poizkusi tole:

for f in "`locate lilo.conf`"; do echo ">>$f<<"; done

Meni izpiše:

,-----
| >>/etc/lilo.conf.example
| /etc/lilo.conf
| /usr/share/man/man5/lilo.conf.5.gz
| /usr/portage/sys-boot/lilo/files/lilo.conf
| /usr/portage/sys-boot/elilo/files/elilo.conf.sample<<
`-----

Iz tega se lepo vidi, da je $f vseboval več vrstic.

-- 
< Jernej Simoncic ><><><><>< http://deepthought.ena.si/ >

When things are going well, someone will inevitably experiment detrimentally.
       -- Boyle's Second Law



More information about the lugos-list mailing list