[PVE-User] using virt-viewer in bash withouth sed and awk...

Dietmar Maurer dietmar at proxmox.com
Mon Mar 17 11:30:46 CET 2014


> I don't know if anyone is interested in...
> 
> rewritten withouth sed and awk

Great! That looks much simpler now.

But depending on attribute order is bad, so I would use the following instead:

TICKET=${DATA//\"/}
TICKET=${TICKET##*ticket:}
TICKET=${TICKET%%,*}

CSRF=${DATA//\"/}
CSRF=${CSRF##*CSRFPreventionToken:}
CSRF=${CSRF%%,*}

I guess that would also work?



More information about the pve-user mailing list