[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bash y espacios en los nombres de fichero



On Fri, Jul 26, 2002 at 08:42:34PM +0200, Amaya wrote:
> Hola listeros...
> 
> Tengo un bug en uno de mis paquetes:
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=152825&msg=1&repeatmerged=yes
(...)
> 
> ¿Se os ocurre algo?

¿Qué tal esto: "`du \"$2\""?

~$ cat /tmp/test.sh
#!/bin/sh

file="test test"
size="`du \"$file\"`"
echo $size

$ sh /tmp/test.sh
du: `test test': No existe el fichero o el directorio

si cambiamos por lo tuyo...
~$ diff /tmp/test.sh /tmp/test-malo.sh
4c4
< size="`du \"$file\"`"
---
> size="`du $file`"

$ sh /tmp/test-malo.sh
du: `test': No existe el fichero o el directorio
du: `test': No existe el fichero o el directorio

	Aclarao?

	Javi


-- 
To UNSUBSCRIBE, email to debian-user-spanish-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: