Re: Bash globbing files only?

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

 



On 30Jan2007 09:08, Daniel Qarras <dqarras@xxxxxxxxx> wrote:
| PS. A hard headed zsh user would continue to complain that there's no
| way to differ between files and links in bash without find but I won't
| go into that :)

A POSIX shell requires that the test command supports this:

       -h  file
              True if file exists and is a symbolic link.
       -L  file
              True if file exists and is a symbolic link.

There are two letters for historic reasons. Bash supports both, and so
does zsh.

Of course, if you mean a hardlink, then you're asking a question
that is meaningless.

BTW, I tend to test directorishness like this:

  [ -d foo/. ]

which works for a directory or a symlink that resolves to a directory.
-- 
Cameron Simpson <cs@xxxxxxxxxx> DoD#743
http://www.cskk.ezoshosting.com/cs/

I am a kind of burr; I shall stick.
        - William Shakespeare, _Measure for Measure_

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

  Powered by Linux