Re: tmpfiles.d and spaces in filenames

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

 



On 1 June 2011 20:30, Mike Williams <dmikewilliams@xxxxxxxxx> wrote:
>
>
> On Wed, Jun 1, 2011 at 3:18 PM, JD <jd1008@xxxxxxxxx> wrote:
>>
>> On 06/01/11 12:05, Patrick O'Callaghan wrote:

>> > No, each filename counts as one argument, even if it has spaces in it.
>> > The problem arises when you *use* the argument. The above should read:
>> >
>> > for i in *; do
>> > [ -f "$i"]&& Âecho "$i" is a file
>> > done

>> > (the quotes are optional in the echo case obviously).

>> The quotes are not optional.
>
>
> I think he meant that the quotes are optional for the echo $i - which is
> correct.
>

Not entirely:
$ echo a  b
a b

> Personally I avoid spaces in filenames and usually use a perl one liner
> to substitute an underscore for spaces when I don't have to keep the
> original name for someone else.

Yes, in general hours of pain here, especially if you work with people
who do lots of shell scripting and another group of people who use
Windows lots.

> zsh works without any quotes, the first example works fine for files with spaces in the names with zsh.

Might have to look into that, I keep meaning to check out zsh properly.

-- 
imalone
-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines


[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux