Substitute vertical lines in Bash
问题 I'm having a hard time finishing my script since there's this part which doesn't function the way I wanted it to be. I have this line in my script: cat /home/tmp/temp1.txt | awk '{gsub("~",RS);gsub("*",RS);print}' > /home/tmp/temp.txt It works fine, yes. But when I do something like this: cat /home/tmp/temp1.txt | awk '{gsub("|",RS);print}' > /home/tmp/temp.txt It's not working at all. I wanted to change all my vertical bars into new line and yet I can't achieve it. Please help me with this.