Rich Freeman on 26 Jan 2013 13:32:03 -0800


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

Re: [PLUG] Strange Bash Behavior vis-a-vis Embedded Spaces


On Sat, Jan 26, 2013 at 4:13 PM, Casey Bralla <MailList@nerdworld.org> wrote:
> I recently tried to do a file deletion and got some strange results.
>
> If I did this command:
>
> rm "/directory with spaces/filename" (with quotes around the full path and file
> name) the command would error out with a file-not-found error.
>
> However, this command works just fine:
>
> rm /directory\ with\ spaces/filename
>
>
> I thought quoting the filename would work, but I had to escape the spaces to
> make it work.  I find the escape method to be difficult to read, while the quoted
> string is very easy.  Hence, I always use the quoted method.
>
> Can anybody explain why the quoted string does not work?
> --
>
>
> Casey Bralla
>
> Chief Nerd in Residence
> The NerdWorld Organisation
> www.NerdWorld.org
> ___________________________________________________________________________
> Philadelphia Linux Users Group         --        http://www.phillylinux.org
> Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
> General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug
>
> !DSPAM:1000,5104470d271591557013051!
>
>
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug