Re: Queue Downloads

<[email protected]> Fri, 6 Sep 2024 16:35:45 +0200
Newsgroups gmane.comp.web.dillo.devel
Message-ID <[email protected]>
> Also, if you want to make this portable so it works on other shells
> than just bash, you can do something like this to get the port number:
> 
> echo $a | cut -f4- -d"'" | rev | cut -c 5- | rev
> 
> There are probably other ways to do it using sed, etc.

Here is a sed equivalent, which might be a more conventional approach:
 
$ echo $a
<cmd='send_data' msg='12345' '>

$ echo $a | sed "s/^.*msg=[']\([^']*\)['].*$/\1/"
12345


-Alex
_______________________________________________
Dillo-dev mailing list -- dillo-dev-lx9mn2B4QYRWk0Htik3J/[email protected]
To unsubscribe send an email to dillo-dev-leave-lx9mn2B4QYRWk0Htik3J/[email protected]