Sed + How to delete single character after other character in line by sed

sed

How to delete single character after other character in line by sed

For example

   LINE="ABCDE 123 |@ TEST"

I want to delete the @ character only if it exist after the first "|" character in LINE

sed command will verify if: @ character exist after "|" , and if its true then sed will delete the @ character

other example

    LINE="qwe 123 >|@ sdf g"  (before sed action)

    LINE=="qwe 123 >| sdf g"  (after sed action)

THX

Best Answer

 % echo "ABCDE 123 |@ TEST" | sed 's,|@,|,'

its essentially the same as your other question.

Related Question