I've used command lines at the prompt, but I never, ever trust someone who makes a big show of typing them from memory. For every time they get it right, they screw something up in their pointless ...
There are quite a few ways to extract words and substrings from lines of text on a Linux system, replace them with other strings, select delimiters, and even get rid of white space at the beginning ...