repo.or.cz
/
llpp.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Smart(er) mouse wheel zooming
[llpp.git]
/
misc
/
gc.awk
blob
b20f68d55197f86bc87e005e8d1bad13fe580cfa
1
#!/usr/bin/gawk -f
2
@load
"filefuncs"
3
4
BEGIN
{
5
RS
=
OFS
=
ORS
=
"
\000
"
6
}
7
8
{
9
path = $
0
10
getline
time
11
12
r = stat
(
path
)
13
data
[
1
]
=
1
14
if
(
stat
(
path
,
data
)
==
-
1
) {
15
if
(
"locate -b -l 1 -e
\"
/"
path
"$
\"
"
|
getline
npath
>
0
) {
16
npath =
""
17
}
18
print
path npath
"
\000
"
;
19
if
(
!npath
) {
20
print
"Removing "
path
"
\n
"
>
"/dev/stderr"
21
}
22
}
23
}