Advertisement
sebbu

List auto-joins channels for a specific server

Sep 27th, 2024 (edited)
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.27 KB | None | 0 0
  1. #!/usr/bin/env bash
  2. if [ "$#" -ne 1 ]
  3. then
  4.         echo "Usage: $0 <server>"
  5.         exit
  6. fi
  7. CD=$PWD
  8. cd -P /xchatlogs/..
  9. sed -nr "/^N=${1}/ { :l /^\\s*[^#].*/ p; n; /^N=/ q; b l; }" ./servlist.conf | grep '^J=' | cut -b 3- | tr -d '\r' | sort | tr '\n' ','
  10. cd $CD
  11.  
Tags: BASH irc hexchat
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement