Re: :t and getting senile.
- From: Stephane Chazelas <stephane_chazelas@xxxxxxxx>
- Date: 26 Sep 2006 08:34:03 GMT
On Mon, 25 Sep 2006 21:23:23 +0100, Stephane CHAZELAS wrote:
[...]
$var:h in zsh gives the dirname even for the cases where
${var%/*} fails such as when var=foo (not with csh or tcsh).
Same for $var:t vs ${var##*/} when var=/foo/.
I forgot to mention that with zsh, they can also be used in the
globbing qualifiers, as globbing modifiers.
Like:
printf '%s\n' /etc/**/*(:t)
prints the *names* (not paths) of all the files under /etc.
--
Stephane
.
- Follow-Ups:
- Re: :t and getting senile.
- From: george . e . sullivan
- Re: :t and getting senile.
- References:
- :t and getting senile.
- From: george . e . sullivan
- Re: :t and getting senile.
- From: Stephane CHAZELAS
- :t and getting senile.
- Prev by Date: Re: handling spaces in the filenames of a URL
- Next by Date: Re: bash: path of script that is being executed
- Previous by thread: Re: :t and getting senile.
- Next by thread: Re: :t and getting senile.
- Index(es):
Relevant Pages
|