Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vdr] Re: printing channel list



Matthias Mueller wrote:

On Fri, May 28, 2004 at 12:06:40PM +0200, Wolfgang Rohdewald wrote:

TV:
1 ARD
2 ZDF

Radio:
500 Swiss Pop
501 Swiss Jazz

awk -F':' ' { if (/^:/)  { print "\n" $2 ": " } else { print $1 } } '
channels.conf

All in one line. This will produce one newline at the beginning, but I
don't care ;-)
You missed the channel numbering :

awk -F':' 'BEGIN{ num = 1; } { if (/^:/) { print "\n" $2 ": "; num = $1 } else { print num, $1; num += 1 } } ' channels.conf

Untested, but the idea is here.

NH





Home | Main Index | Thread Index