annotate bin/bseen @ 2040:9464fe0ca8a2
<ais523> echo "#!/bin/sh" >bin/list; echo -n \'oldpwd=`pwd`; cd /var/irclogs/_esoteric; name=$(cat $(ls ????-??-??.txt | tail -1) | tail -1 | sed "s/[^<]*<//; s/>.*//"); cd $oldpwd; echo -n $name "" >> bin/list; echo \' >> bin/list
author |
HackBot |
date |
Thu, 07 Feb 2013 21:46:12 +0000 |
parents |
d32a6933bc5d |
children |
|
rev |
line source |
1625
|
1 #!/usr/bin/env bash
|
|
2 s="<${1% }>"
|
|
3 while ((i++ < 30)) && read -r file; do
|
|
4 line=
|
|
5 while read -r t n m; do [[ $n =~ $s ]] && line="$t $n $m"; done <"$file"
|
1629
|
6 [[ -n "$line" ]] && { printf '%s:%s\n' "${file##*/}" "$line"; exit; }
|
1625
|
7 done < <(ls -r /var/irclogs/_esoteric/????-??-??.txt)
|
|
8 echo 'well, not lately'
|
|
9
|