I have a variable "header", and if there is the chaine "last" inside it i'd like to do nothing, but if the chain "last" is not inside my variable, i'd like to delete the whole variable (header = "")
I was searching for sth like this, but obviously it doesn't work like this.
echo $header | sed "/!'last'//"
How to do a negation with sed? Can someone help me please?
Thank you