0

I am trying to change a line in a file without -t to include it;

sudo sed -i.bak 's|create cifs.spnego * * /usr/sbin/cifs.upcall %k|create cifs.spnego * * /usr/sbin/cifs.upcall -t %k|g' /etc/request-key.d/cifs.spnego.conf

However when I cat the file, nothing has changed

  • Does the original file contain literal * characters that you're trying to match? Those will need escaping, as in this similar problem. – JigglyNaga Oct 22 '19 at 10:05
  • yes, above is the line in the file verbatim – eekfonky Oct 22 '19 at 10:46
0

sudo sed -i.bak 's|create cifs.spnego \* \* /usr/sbin/cifs.upcall %k|create cifs.spnego \* \* /usr/sbin/cifs.upcall -t %k|g' /etc/request-key.d/cifs.spnego.conf

Seems to have done the trick

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.