Let's assume I receive the following output after executing a bash script in CLI (so this text will be displayed in terminal):
POST https://mycompany.com/ COOKIE='BLABLABLABLABLA' HOST='ANYIPADDRESS' FINGERPRINT='sha256:BLABLABLABLA'
How can I store the content of
COOKIE(only the text between
') into a separate file?
Furthermore, the mentioned text should be pasted into this external file at a specific position.
The already existing file content looks like that:
[global] Name = Name of VPN connection [provider_openconnect] Type = OpenConnect Name = Name of VPN connection Host = IP-address Domain = Domain name OpenConnect.Cookie = >>>INSERT CONTENT OF THE COOKIE HERE<<< OpenConnect.ServerCert = sha256:BLABLABLABLA
How is that possible?