awk one liner help
Hi and hello to all.
I am working on a very small script as a complete newbie and need a little help on an awk expression.
What I need to do:
I have a txt file whose first and only line is:
--username:someusername --password:somepassword --server:someserver
I am trying to extract the actual password so I can use as part of a sed routine so am storing the output to a variable.
--password is always in the same position in the file, but not at the same char count.
I have an awk one line which just uses the man examples so I can easily get the output to a variable of --password:somepassword by using $2, but all i need is the text string 'somepassword' which is the actual password text.
So, can anyone help with a one liner that can extract the password from this file and store as a variable?