Some pointers: You can use sed s command to first replace the string '@.*' with the null string and then replace the string '.*:' with the null string, which leaves the word before the '@' but after the preceding ':'.
Another tip: using ; command separator character you can specify both s commands in one sed command line.
Pointer b) : Capture the string preceding the monkey tail ( @ ) composed by any number of non-colon ( : ) characters and replace the whole string with the captured part.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.