Greetings,
I have exported my putty sessions on my windows box to a .reg file. For each server entry, I need to pull session name and host name. I am able to get this info but have been unable to combine the results on one line.
The closest I have gotten is:
Code:
egrep '(session|hostname)' sourcefile
The results of session and hostname are on separate lines in STDOUT.
I need to:
a. join each match of session and hostname onto one line
b. either before or after the join, I need to run cut or awk to print only the fields I need
c. once I have done a & b, I want it to echo each match one at a time. perhaps print one line of session/hostname then wait for the "any key" to be pressed before presenting the next result.
Thank you in advanced for your assistance!
Best regards,
Brenden