skip to Main Content

Regex to extract multiple words from a paragraph – Debian

$ echo file.txt NAME="Ubuntu" <--- some of this VERSION="20.04.4 LTS (Focal Fossa)" <--- and some of this ID=ubuntu ID_LIKE=debian VERSION_ID="20.04" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" VERSION_CODENAME=focal I want this: Ubuntu 20.04.4 LTS. I managed with two commands: echo "$(grep '^NAME="' ./file.txt | sed…

VIEW QUESTION

How to edit a file with SED? – Docker

I am running docker on a Virtual Machine on an Amazon AWS EC2 instance and I want to edit one file (application.properties) which lies in the following directory: root@e2afc27e858e:/score-client/conf/applications.proteries The docker image does not seem to contain vim/vi, nano or…

VIEW QUESTION
Back To Top
Search