I am using the sed command to search a file for a particular pattern and replacing it with somehting depending on the pattern. what I'm having trouble with is replacing the whole line with the word and getting rid of the rest of the line. I don't want to manipulate the file though. just the output
for example:
12345blahblahblah
abcde
would be:
numeric
empty
word
but my expression does:
numericblahblahblah
Edit: my empty just doesn'st work. I don't knwo how to search for empty line
for example:
12345blahblahblah
abcde
would be:
numeric
empty
word
but my expression does:
numericblahblahblah
Edit: my empty just doesn'st work. I don't knwo how to search for empty line