Mercurial > repo
changeset 2735:f4a2725a0dcb
<oerjan> sed -i \'s/lines=\\([$].*\\)/lines="\\1"/\' bin/pastelog
author | HackBot |
---|---|
date | Wed, 17 Apr 2013 22:43:05 +0000 |
parents | 705d5d05d8d1 |
children | f2ef430d0223 |
files | bin/pastelog |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/bin/pastelog Wed Apr 17 21:54:28 2013 +0000 +++ b/bin/pastelog Wed Apr 17 22:43:05 2013 +0000 @@ -16,7 +16,7 @@ if expr "$1" + 0 >/dev/null 2>&1; then pasterandom "$1" else - lines=$(timeout 25 grep -P -i -- "$1" ????-??-??.txt | head -n 301) + lines="$(timeout 25 grep -P -i -- "$1" ????-??-??.txt | head -n 301)" { echo "$lines" | head -n 300 [ $(echo "$lines" | wc -l) -eq 301 ] && echo "[too many lines; stopping]"