zsh-users
 help / color / mirror / code / Atom feed
From: Thor Andreassen <ta@imada.sdu.dk>
To: zsh-users@sunsite.dk
Subject: Re: listing/deleting empty directories recursively
Date: Sat, 19 Nov 2005 12:59:27 +0100	[thread overview]
Message-ID: <20051119115926.GB329@imada.sdu.dk> (raw)
In-Reply-To: <20051119115653.GA329@imada.sdu.dk>

On Sat, Nov 19, 2005 at 12:56:53PM +0100, Thor Andreassen wrote:
[snip]
> This should do the trick:
> 
> for dir in `ls -ld **/*(/^F)`; do echo $dir > LOGFILE; rmdir $dir; done

You should use double quotes (") around the dir variable if you have
dirnames with spaces (and some other chars), i.e. echo "$dir" and rmdir
"$dir".

-- 
Thor Andreassen


  reply	other threads:[~2005-11-19 11:59 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-19  9:19 zzapper
2005-11-19  9:57 ` Christian Taylor
2005-11-19 11:28   ` zzapper
2005-11-19 11:56     ` Thor Andreassen
2005-11-19 11:59       ` Thor Andreassen [this message]
2005-11-19 12:48         ` Christian Taylor
2005-11-19 14:54           ` Thorsten Kampe
2005-11-19 15:59           ` Stephane Chazelas
2005-11-19 14:39     ` Lloyd Zusman
2005-11-19 16:09     ` Bart Schaefer
2005-11-19 17:07       ` zzapper
2005-11-19 19:39         ` Bart Schaefer
  -- strict thread matches above, loose matches on Subject: below --
2005-11-18 19:49 zzapper

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20051119115926.GB329@imada.sdu.dk \
    --to=ta@imada.sdu.dk \
    --cc=zsh-users@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).