$ echo -e "AsometAhingA\nsomethingA\nASomethiAng" AsometAhingA somethingA ASomethiAng $ echo -e "AsometAhingA\nsomethingA\nASomethiAng" | sed "s/A//" sometAhingA something SomethiAng $
I know that
sed "s/A//" deletes the first match in every line.
But I want to delete only the first match in a text file or stream.
How can I do this?
sed -i "MAGIC" file.txt