annotate bin/cygclean @ 2:f9d4af74e3d0
convert firefox bookmarks file to xml, e.g. for making a new ~/u/New_Tabs.py
| author |
Henry S. Thompson <ht@inf.ed.ac.uk> |
| date |
Tue, 18 Aug 2026 15:38:14 +0100 |
| parents |
2aa53823fb21 |
| children |
bca2a490a6f4 |
| rev |
line source |
|
0
|
1 #!/bin/bash
|
|
|
2 cd ~/u/Downloads/Cygwin\ setup
|
|
|
3 pat=http*%3a%2f%2f*
|
|
|
4 me=$$
|
|
|
5 find $pat -type f -print0 | xargs -0 ls -t > ssn$me
|
|
|
6 find -L oldMirrors/$pat -type f -print0 | xargs -0 ls -t > sso$me
|
|
|
7 wc -l ss?$me
|
|
|
8 cat ss?$me | while read f; do echo `basename $f`; done > ssb$me
|
|
|
9 while read f; do echo ${f%%-[0-9]*}; done < ssb$me | sort | uniq -c | egrep -v ' 1 |setup.ini' | tr -s ' ' ' ' | cut -d ' ' -f 3 | sed 's/+/\\\\+/g' > ssp$me
|
|
|
10 while read p; do egrep -h "/$p-[0-9]" ss?$me|tail -n +2 ; done <ssp$me | xargs -n 100 rm
|
|
|
11 find $pat -type f -print0 | xargs -0 ls -t > snn$me
|
|
|
12 find -L oldMirrors/$pat -type f -print0 | xargs -0 ls -t > sno$me
|
|
|
13 wc -l sn?$me
|