mirror of
https://github.com/opnsense/src.git
synced 2026-02-27 03:40:37 -05:00
16 lines
443 B
Awk
16 lines
443 B
Awk
# readable.awk --- library file to skip over unreadable files
|
|
#
|
|
# Arnold Robbins, arnold@gnu.org, Public Domain
|
|
# October 2000
|
|
|
|
BEGIN {
|
|
for (i = 1; i < ARGC; i++) {
|
|
if (ARGV[i] ~ /^[A-Za-z_][A-Za-z0-9_]*=.*/ \
|
|
|| ARGV[i] == "-")
|
|
continue # assignment or standard input
|
|
else if ((getline junk < ARGV[i]) < 0) # unreadable
|
|
delete ARGV[i]
|
|
else
|
|
close(ARGV[i])
|
|
}
|
|
}
|