I have a file with pattern as below:
12345.ABC9998
12345555.abc:ffr.abc-MKDHJKSJJDOKSOKSDCKJODCKJ
12345.ABC9998
12345555.abc:ffr.abc-MKDHJKSJJDOKSOKSDCKJODCKJ
I wanted to delete everything before the dash and including the dash itself for each of the second line.
Desire output:
12345.ABC9998
MKDHJKSJJDOKSOKSDCKJODCKJ
12345.ABC9998
MKDHJKSJJDOKSOKSDCKJODCKJ
I know sed 's/^[^A-Z]*//' file.txt
can do the thing but it will do for every line. How do I edit it to work only on the line I want(each second line)?
s/.*-//
?