gri6507 has asked for the wisdom of the Perl Monks concerning the following question:
I post this question not because I don't want to do the work, but because I don't want to reinvent the wheel for the work that I would have to do.
My task is this: I need to parse out /etc/remote to find the device tag (i.e. dv=/dev/term/a) for a particular handle. The problem is that sometimes the handle is listed only as a compatibility link (i.e. tc=sysa) and then I have to find the device tag for the sysa handle (or keep on recursing ad infinitum until a device tag is found). For example, having the following /etc/remote
MyPort:\ :dv=/dev/term/b:br#9600:el=^C^S^Q^U^D:ie=%$:oe=^D: sysa:\ :dv=/dev/term/a:br#9600:el=^C^S^Q^U^D:ie=%$:oe=^D: MyAlias:tc=sysa
the device for 'MyPort' is /dev/term/b, and the device for 'MyAlias' is /dev/term/a.
Does anyone know if something like this exists? It seems like I would be reinventing the wheel if I rolled my own code. Thanks.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Parsing /etc/remote
by merlyn (Sage) on Nov 29, 2005 at 14:59 UTC | |
by gri6507 (Deacon) on Nov 29, 2005 at 15:28 UTC | |
by serf (Chaplain) on Nov 29, 2005 at 15:49 UTC | |
by gri6507 (Deacon) on Nov 29, 2005 at 16:00 UTC | |
by serf (Chaplain) on Nov 29, 2005 at 16:12 UTC |