I've found that solution on the Internet. It wasn't the only solution that I found,but that form won the challenge because it has found my mind ready to detect that it could have worked. Maybe I could have used while,but after 1 hour of thinking I didn't understand how and I resigned. The same for until and for. Sorry for that,but I'm not an experienced coder. I try to do my best with what I find on the Internet. I can adapt an already good enough solution to fit my needs,but I'm not able to write a script from scratch. It is also true that I found it good because it reminded me of my old good times when I was a good basic and turbo pascal programmer.
On Mon, May 13, 2024 at 3:24 PM Nicolas George <geo...@nsup.org> wrote: > Mario Marietto (12024-05-13): > > The command iptables -A POSTROUTING -t nat -s 192.168.1.5 -j MASQUERADE > > doesn't work if invoked as a user,it says "you must be root". So,as > > user,the script seems to be working fine like this : > > > > function jumpto > > { > > label=$1 > > cmd=$(sed -n "/$label:/{:a;n;p;ba};" $0 | grep -v ':$') > > eval "$cmd" > > exit > > } > > You seem to be investing a lot of effort into a fragile solution to > emulate a deprecated execution control primitive. > > Regards, > > -- > Nicolas George > > -- Mario.