mirror of https://github.com/rwxrob/dot
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
288 B
Plaintext
18 lines
288 B
Plaintext
3 years ago
|
#!/usr/bin/env bash
|
||
|
|
||
|
tmp=$(mktemp)
|
||
|
IFS=$'\n'
|
||
|
while read -r line; do
|
||
|
[[ $line =~ https: ]] || continue
|
||
|
line="http${line##*http}"
|
||
|
line=${line%% *}
|
||
|
echo $line
|
||
|
done < "$WEECHAT_LOG" > "$tmp"
|
||
|
if isterm; then
|
||
|
tail -10 "$tmp" |lolcat
|
||
|
else
|
||
|
tail -10 "$tmp"
|
||
|
fi
|
||
|
rm "$tmp"
|
||
|
|