#!/bin/sh

cp channels.pl channels.bak.$$
cat channels.pl |perl -pe 's/\[".*?"\s+,(".*?").*/$1;/' | perl -pe 's/\@chan/\$chan_wanted/' > channels_wanted.pl
cat channels.pl | perl -pe 's/\[(".*?")\s+,".*?" /\[$1/' > channels.tmp
cp channels.tmp channels.pl
rm channels.tmp
echo "1;" >> channels_wanted.pl
echo "1;" >> channels.pl





