Re: Problem with spaces in filenames
- From: Ross Burton <r burton 180sw com>
- To: nautilus-list gnome org
- Subject: Re: Problem with spaces in filenames
- Date: Sun, 16 May 2004 19:49:10 +0100
On Sun, 2004-05-16 at 22:03 +1000, Peter Harvey wrote:
> A possibly better piece of shell script is this:
>
> FILE=$(echo -e "$(echo ${NAUTILUS_I_FORGET_THE_NAME_OF_THE_VAR} | sed -e 's/^file:\/\///' -e 's/\\/\\\\/g' -e 's/%/\\x/g')")
Personally, I use:
(where $URL is the name of the var we can't remember the name of, this
is from a nautilus thumbnailer which accepts $1 as the URL)
PROTOCOL=${URL%%//*}
if [ "x$PROTOCOL" != "xfile:" ] ; then
echo "URL is not local" >&2
exit 1
fi
INPUT=${URL##*://}
Ross
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]