[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: Off-topic: filtering stream of pathnames for glob'd exclusions
From:       Seth David Schoen <schoen () loyalty ! org>
Date:       2024-04-22 20:48:02
Message-ID: ZibNArR8RS1YCmzT () demorgan
[Download RAW message or body]

Philip Prindeville writes:

> Hi,
> 
> Somewhat off-topic post but this is on a system that has Busybox installed so I \
> can't use features that other shells might provide. 
> I have a stream generated by "find" of pathnames, and I want to delete (filter out) \
> certain paths based on the contents of a file that holds exclusions.

If you can modify the find command itself, you could add a "-not -path"
clause with a glob pattern.

For example,

find / -not -path '*e*'

finds all paths on the system that don't contain the letter e.  If there
aren't too many such lines, you could make a "-not -path" clause for each of
them.
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic