I need help with a sed command that copies the line of birthday to standard output, removing all lines that start with an "A". Suppose my sample.txt file looks like this:
A birthday is very much celebrated.
Today is my birthday.
I can celebrate my birthday.
A man can do anything.
and this is the sample output:
Today is my birthday.
I can celebrate my birthday.
So, for the birthday line:
sed -n /birthday/p sample.txt
and for the removing the lines that starts with "A":
sed -n '/^A/!p' sample.txt
Now, i am confused on how to combine these two lines so that they can work according to the question.