I have .txt file which has following data:
user-5
user-10
user-12
user-23(some text)
user-11@dsa.dsd
user-23-sometext
I want to leave only user-NUMBER. So I have to remove text after @, ) and second -.
I'm trying to use sed command, already succed with @ and ). How can I remove text after second -?
My code: sed 's/[)|@].*//g'