Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Finding symbolic links that are outside a tree (comp.unix.shell)
- X-seq: zsh-users 8975
 
- From: Thorsten Kampe <thorsten@xxxxxxxxxxxxxxxx>
 
- To: zsh-users@xxxxxxxxxx
 
- Subject: Finding symbolic links that are outside a tree (comp.unix.shell)
 
- Date: Tue, 7 Jun 2005 17:01:13 +0100
 
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
 
- Sender: news <news@xxxxxxxxxxxxx>
 
Hi, this has originally been posted to comp.unix.shell by "rh0dium
<sklass@xxxxxxxxxxxxxxx" and I couldn't find a solution for zsh.
So can this be done with zsh globbing? I couldn't get any further as
"print -l **/*(@)" which prints only symbolic links but doesn't do
anything for "that are outside a tree".
Thorsten
******************************************************************
Can anyone help me with a simple script to find links ouside of a
tree.
 What I want is given the following tree two results would show up
tree
   a
      1 -> ../b
      2
   b
      1 -> ../../../foo
      2 -> ../c/1
   c
      1 ->/foo/bar
      2
So I would expect 2 results
b1 and c1 should be the output.  I just can't think of a slick way to
script this.  Anyone care to offer a bit of assistance?
I'd love a zsh function or bash function which does this.
******************************************************************
Messages sorted by:
Reverse Date,
Date,
Thread,
Author