in reply to Parsing /etc/remote

That looks a lot like Term::Cap format. Try that module to do the parsing, or search for "termcap" parsers in Perl.

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.

Replies are listed 'Best First'.
Re^2: Parsing /etc/remote
by gri6507 (Deacon) on Nov 29, 2005 at 15:28 UTC
    Thanks merlyn, it seems to almost work.
    use strict; use warnings; use English; use Term::Cap; my $PortName = 'MyPort'; if (scalar(@ARGV)) { $PortName = $ARGV[0]; } $ENV{TERMPATH} = '/etc/remote'; my $terminal = Tgetent Term::Cap { TERM => $PortName, OSPEED => 9600}; print $terminal->Tgoto('dv', "", "",);

    So, when called with MyPort parameter, it gives me /dev/term/b as expected. However, when called with MyAlias parameter, it does not return anything (but no errors either). What am I missing?

      Although it doesn't seem to be required by the file format in the examples and man pages I've looked at, if the end of the alias line is terminated with a colon it will work as expected.
        Unfortunately, the customers' /etc/remote will be as I have outlined above - without a colon. However, after reading the documentation, it seems that I should be able to set the TERMCAP environment variable to account for that, but I cannot seem to figure out how (Correction - to what. Any suggestions?