https://github.com/gromnitsky/flperc
filter-out non-existing file names from stdin (it's more useful than it sounds)
https://github.com/gromnitsky/flperc
Last synced: 3 months ago
JSON representation
filter-out non-existing file names from stdin (it's more useful than it sounds)
- Host: GitHub
- URL: https://github.com/gromnitsky/flperc
- Owner: gromnitsky
- Created: 2021-01-16T22:16:19.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-01-16T22:16:55.000Z (over 4 years ago)
- Last Synced: 2025-03-13T10:23:53.220Z (7 months ago)
- Language: C
- Size: 2.93 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# flperc
flperc (File List Percolator) -- filter-out non-existing file names
from stdin.~~~
$ ./flperc -h
./flperc: invalid option -- 'h'
Usage: printf '%s\n%s' /usr /usr/file | flperc [-0L] [-d char] [bcdpfls]
-L is -L from find(1)
-d CHAR a custom delimiter instead of a newline
-0 a shortcut for -d $'\0'
-V print the program versionbcdpfls see find(1) -type option
~~~## Why?
Sometimes you have a list of files coming from a pipe that you need to
filter-out. Grep has no idea whether `/some/dir` string represents a
file thata) exists;
b) is a directory, a 'regular' file or a symlink.find(1) does a file traversal while applying its filters--it doesn't
accept a list of files from stdin.## Compilation
Type `make`.
## TODO
Additional find(1)-like filters could be useful like -mtime, -size,
-empty.## License
MIT.