Develop and Download Open Source Software

Browse Subversion Repository

Contents of /trunk/ttssh2/ttxssh/cvtservices.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3221 - (show annotations) (download) (as text)
Tue Mar 24 09:37:20 2009 UTC (14 years, 11 months ago) by maya
File MIME type: text/x-perl
File size: 360 byte(s)
CVS から SVN へ移行: trunk に集約
1 #!perl -w
2
3 my(%map) = ();
4
5 while (<>) {
6 chop;
7 s/#.*//;
8 tr[A-Z][a-z];
9 my(@tokens) = split;
10
11 if (defined($tokens[1]) && $tokens[1] =~ m!^([0-9]+)/tcp$!) {
12 my($port) = $1;
13 $map{$tokens[0]} = $port;
14 foreach $alias (@tokens[2..$#tokens]) {
15 $map{$alias} = $port;
16 }
17 }
18 }
19
20 foreach $k (sort(keys(%map))) {
21 print " { $map{$k}, \"$k\" },\n";
22 }

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26