made the pack completely portable and wrote relevent bat files to go with it
This commit is contained in:
17
gitportable/usr/share/awk/readable.awk
Normal file
17
gitportable/usr/share/awk/readable.awk
Normal file
@@ -0,0 +1,17 @@
|
||||
# readable.awk --- library file to skip over unreadable files
|
||||
#
|
||||
# Arnold Robbins, arnold@skeeve.com, Public Domain
|
||||
# October 2000
|
||||
# December 2010
|
||||
|
||||
BEGIN {
|
||||
for (i = 1; i < ARGC; i++) {
|
||||
if (ARGV[i] ~ /^[a-zA-Z_][a-zA-Z0-9_]*=.*/ \
|
||||
|| ARGV[i] == "-" || ARGV[i] == "/dev/stdin")
|
||||
continue # assignment or standard input
|
||||
else if ((getline junk < ARGV[i]) < 0) # unreadable
|
||||
delete ARGV[i]
|
||||
else
|
||||
close(ARGV[i])
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user