Spaces (and other characters) in filenames
John DeCarlo
johndecarlo at gmail.com
Thu Aug 24 18:34:23 UTC 2006
On 8/23/06, Freddie Cash <fcash-ml at sd73.bc.ca> wrote:
> What's difficult? Just put "" around the filenames and everything
> Just Works. :) Works with any and all command line apps. If there's
> some really crazy characters in the file/directory name (like * or ?),
> then use single quotes '' instead.
>
> # cd "/some/long directory_path/With weir' names/and_ filenames.txt"
> # cp "this is a bad file name as there's punctuation...txt" /some/dir
> # oowriter "some other filename with spaces.odt"
The funny thing about this is that I started always putting quotes
around variables ("$1") in Windows (DOS) scripts. So I naturally
carried over the practice to Linux.
Just good practice if the variable may contain spaces.
--
John DeCarlo, My Views Are My Own
More information about the kubuntu-users
mailing list