[LatinaLUG] Regexp, maledette regexp...

Franco latina@lists.linux.it
Tue, 21 Jan 2003 12:19:31 +0100


--h31gzZEtNLTqOjlF
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Il Tue 21 Jan 2003 00:11 +0100, Henryx ha scritto:

[...]
>
>$ for i in `ls -1 *`; do mv "$i" `echo "$i"|sed 's/\%20/ /g'`;done

for i in *; do mv "$i" "`echo "$i"|sed 's/\%20/ /g'`"; done

fa il lavoro. I "" sul secondo parametro del mv causano, che
il shell lo passa come un parametro anzi di tanti.
Apro: il `ls -1 *` non ti serve, un semplice * basta.
Se c'e` al massimo un %20 dentro i filename basta anche:
mmv '*%20*' '#1 #2'

[...]

--=20
Don't worry, be happy...
Ciao tex

--h31gzZEtNLTqOjlF
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: Weitere Infos: siehe http://www.gnupg.org

iD8DBQE+LSzDFrTXEVJo0H4RAjkoAJ909OxGgkx2j+tLOlujEDpG0Z07lACfWozR
+xLYvEJizAtOd8rBl3x+WEA=
=s+4v
-----END PGP SIGNATURE-----

--h31gzZEtNLTqOjlF--