OK, just to knock it on the head, and putting it together with
the previous mail I sent on the best Shebang line, this is actually
what I was trying to achieve
with the r L_RT.l script :

Mode 1: List Routes
$  ./L_RT.l -pr
0.0.0.0/0               wlp59s0                 192.168.43.1            UP,GW
                600     {       default:1       flags:3 mask:0.0.0.0    
prefsrc:192.168.43.70   protocol:dhcp   scope:global    type:unicast    }
0.0.0.0/32              *                       0.0.0.0                 UP,HO
                0       {       flags:5 mask:255.255.255.255    protocol:boot   
scope:global    type:blackhole  }
..
W.X.Y.Z/32              wlp59s0                 192.168.43.1            UP,GW,HO
        50      {       flags:7 mask:255.255.255.255    protocol:static 
scope:global    type:unicast    }

Mode 2:  Be Sourced:
$ pil ./L_RT -bye
$

Mode 3: Having sourced a script containing a Handler, invoke handler instead:

$ pil ./L_RT_rh.l ./L_RT.l pico~Rt
0/0:"192.168.46.70"
B0A87A00/24:"192.168.123.1"
B0A82D01/32:"192.168.45.10"
B0A82C00/24:"192.168.46.70"

(hex IPs changed).

On 06/08/2023, Jason Vas Dias <jason.vas.d...@gmail.com> wrote:
> Much better (final) version.
>

Attachment: L_RT.l
Description: Binary data

Attachment: L_RT_rh.l
Description: Binary data

Reply via email to