Hey guys i am in a bit of a jam.
Quick backstory iI am extracting ascii data from network packages captured by tcpdumptcpdump. I have manipulated the data to the point iI am on a single string and now need to cut it. The problem the left over string has the package header followed by the ascii data.
A string example is +%_!^0r,zK"5÷fgf/Nametoextractanothernametoextracthostname1.1.1.12.1iwm876
+%_!^0r,zK"5÷fgf/Nametoextractanothernametoextracthostname1.1.1.12.1iwm876
Now the names to extract can change and be different. The hostname is the the variable iI am using a constant. I want to add a delimiter in front of the host name so iI can then use cut to remove the junk at the end of the string.
An example would be of the desired result
+%_!^0r,zK"5÷fgf/Nametoextractanothernametoextract:hostname1.1.1.12.1iwm876
+%_!^0r,zK"5÷fgf/Nametoextractanothernametoextract:hostname1.1.1.12.1iwm876
So iI can then use cut to get this output:
Nametoextract anothernametoextract
Nametoextract anothernametoextract