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

[no subject]



Thanks very much for the help.

On Wed, 16 Feb 2005, Geoffrey wrote:

> John Mills wrote:

> > I have a directory with softlinks to a number of files that no longer 
> > exist, along with links to files that _do_ exist.
> > 
> > How can I selectively list those links which are _not_ satisfied, so I can 
> > remove them at one go, while ignoring those for which the linked files 
> > still exist?
 
> rm $(for fn in *; do
> test -f $fn || echo $fn
> done)

Very clean. Thanks - not only did I learn something new, now I better 
understand some things I was already doing without thinking about them!

 - John Mills
   john.m.mills at alum.mit.edu


</pre>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<hr>
<!--X-Follow-Ups-End-->
<!--X-References-->
<ul><li><strong>References</strong>:
<ul>
<li><strong><a name="00626" href="msg00626.html">[ale] Bash (or whatever) question</a></strong>
<ul><li><em>From:</em> esoteric at 3times25.net (Geoffrey)</li></ul></li>
</ul></li></ul>
<!--X-References-End-->
<!--X-BotPNI-->
<ul>
<li>Prev by Date:
<strong><a href="msg00652.html">[ale] SUSE 9.2 DVD</a></strong>
</li>
<li>Next by Date:
<strong><a href="msg00654.html">[ale] Delivery service mail</a></strong>
</li>
<li>Previous by thread:
<strong><a href="msg00626.html">[ale] Bash (or whatever) question</a></strong>
</li>
<li>Next by thread:
<strong><a href="msg00691.html">[ale] Bash scripting question #2</a></strong>
</li>
<li>Index(es):
<ul>
<li><a href="maillist.html#00653"><strong>Date</strong></a></li>
<li><a href="threads.html#00653"><strong>Thread</strong></a></li>
</ul>
</li>
</ul>

<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
</body>
</html>