1
I've got a file which contains some amount of lines, I want to look for a specific string, and if the file contains it, then I want to print a different line from the same file. for example, let's assume I have the file:
aaa
bbb
ccc
Let's say that I'm looking for bbb
, and if I find it I want to print the following line (in the example, ccc
).
I know that with grep I can easily search for the "bbb", but what command can I use in order to print a different line of the same file?