mirror of
https://github.com/rwxrob/dot
synced 2024-11-18 15:25:52 +00:00
18 lines
288 B
Bash
Executable File
18 lines
288 B
Bash
Executable File
#!/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"
|
|
|