[Linuxtrent] Re: Bash, cicli for e nomi di file con spazi vuoti: come fare?

  • From: Flavio Visentin <THe_ZiPMaN@xxxxxxxxx>
  • To: linuxtrent@xxxxxxxxxxxxx
  • Date: Sat, 16 Dec 2006 16:46:06 +0100

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Marco Ciampa wrote:
>> Soffre di analogo problema. Bisogna quotare $i.
> Così vuoi dire:
> 
> ls|while read `ls`; do mv "$i" /tmp; done

ls -1 | while read i ; do mv "$i" /tmp ; done

oppure:

for i in * ; do mv "$i" /tmp ; done

- --
Flavio Visentin
GPG Key: http://www.zipman.it/gpgkey.asc

There are only 10 types of people in this world:
those who understand binary, and those who don't.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFFhBS+usUmHkh1cnoRAoUHAJ98OKSSg6adHgPIkzw2UmMYDjdbBQCeP3so
QNj90B2bKWV92rhry/bQD2A=
=be4g
-----END PGP SIGNATURE-----
-- 
Per iscriversi  (o disiscriversi), basta spedire un  messaggio con OGGETTO
"subscribe" (o "unsubscribe") a mailto:linuxtrent-request@xxxxxxxxxxxxx


Other related posts: