From e2a48d8701f91b8e24fbe9e99e91eb72a87bb749 Mon Sep 17 00:00:00 2001 From: horchi Date: Sun, 5 Mar 2017 16:39:28 +0100 Subject: git init --- scripts/epgd-ls-channelids | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100755 scripts/epgd-ls-channelids (limited to 'scripts/epgd-ls-channelids') diff --git a/scripts/epgd-ls-channelids b/scripts/epgd-ls-channelids new file mode 100755 index 0000000..e4f6f3e --- /dev/null +++ b/scripts/epgd-ls-channelids @@ -0,0 +1,39 @@ +#!/usr/bin/perl + +use strict; +use Getopt::Long; + + +if (($#ARGV!=0) || (! $ARGV[0])) +{ + print "Usage: $0 \n"; + exit 1; +} + +open CHANNELS, $ARGV[0] + or die $!; + +my(@lines)=; + +foreach my $line (@lines) +{ + my @column=split(/:/, $line); + my @name=split(/;/, $column[0]); + + # These are the names and field numbers from channels.conf: + # + # Name: $column[0], Freq: $column[1], Param: $column[2], Src: $column[3], Symb: $column[4], + # VPID: $column[5], APID: $column[6], TPID: $column[7], CAID: $column[8], SID: $column[9], + # NID: $column[10], TID: $column[11], RID: $column[12] + + # make sure to print the "data lines" only: + + if (($column[3] =~ /^S/) || ($column[3] =~ /C/) || ($column[3] =~ /I/)) + { + print "$column[3]-$column[10]-$column[11]-$column[9] \/\/ $name[0]\n"; + } + + +} + +close(CHANNELS); -- cgit v1.2.3