I want to extract IP address, system ID and engine IDs of this file ( marked in red) and put in a csv. E.g.
1.1.1.1, SYSTEMID, 000012345678981123548912
I get these file by running an expect script from solaris.
Here is the text file output of my expect script.
working on 1.1.1.1
SNMP Engine ID : 000012345678981123548912^M
*A:SYSTEMID# logout ^M
working on 1.1.1.1
SNMP Engine ID : 000012345678981123548912^M
*A:SYSTEMID# logout ^M
working on 1.1.1.1
SNMP Engine ID : 000012345678981123548912^M
*A:SYSTEMID# logout ^M
After code-tagged the content, its clearly seen that the file contains ^M
Which is probably caused by choosing binary ( the default) format while FTPing from windows to unix.
You can use dos2unix or similar utilities