All pastes #416195 Raw Edit

Miscellany

public shellscript v1 · immutable
#416195 ·published 2007-03-30 03:27 UTC
rendered paste body
#!/bin/bashcat "$1" | while read LINE; do        NAME=$(sed -e 's/^.\{23\}//' <<<"$LINE" | sed -e 's/>.*$//')        if [[ "$LINE" =~ '^.{22}<-- ' ]]; then             NAME=$(sed -e 's/^.*<-- //' <<<"$LINE" | sed -e 's/ (.*$//')        elif [ "$NAME" == "powergoal" ]; then             NAME=$(sed -e 's/^.*> //' <<<"$LINE" | sed -e 's/:.*$//')        fi        FILENAME="&bitlebee.$NAME.weechatlog"        echo "$LINE" >> "$FILENAME"done