If you have a text file that looks like this:
start_folder='/folder1/abc.txt' iterations='123' passphrase='xyz' last_command='invoke' return_value='0'
How can you pick out just xyz when looking for "passphrase"?
grepwill get me the line but what should I use if I want just a part of the line?
Can it be done in one command or do I have to pipe several together?
If you the text has a character that would be a good delimiter, you can pipe grep to cut... ie:
cat myfile.txt|grep "iterations"|cut -d '=' -f 2 Output: '123'
the -f # is which column you want.
There may be other ways to do it, but that's the first way I can think of.
You can specify a file with grep, no need to pipe in from cat.