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.
In reply to Parsing /etc/remote by gri6507
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |