This commit is contained in:
James Tomasino 2018-12-14 00:00:01 +00:00
parent 78f412c6c5
commit f43ccef893
3 changed files with 3 additions and 3 deletions

View File

@ -4,4 +4,4 @@
0RSS Feed /rss.xml
Most recent (20) log entries:
=head -n 20 listing.gophermap
=head -n 20 listing.gophermap | sed 's|^0||' | awk -v tot="$(wc -l listing.gophermap)" '{print 0 int(tot)-NR+1 " >> " $0}'

View File

@ -1,2 +1,2 @@
=intro.gophermap
=/var/gopher/listing.gophermap
=sed 's|^0||' /var/gopher/listing.gophermap | awk -v tot="$(wc -l /var/gopher/listing.gophermap)" '{print 0 int(tot)-NR+1 " >> " $0'}

View File

@ -8,4 +8,4 @@ if [ -f "$desc" ]; then
fi
printf "%s - Ship Log\\n" "$ship"
grep "^0${ship}" "/var/gopher/listing.gophermap" | sed "s|0${ship} - |0|"
sed "s|^0||" /var/gopher/listing.gophermap | awk -v tot="$(wc -l /var/gopher/listing.gophermap)" '{print 0 int(tot)-NR+1 " >> " $0}' | grep "^.*>>\\ ${ship}"