Hi, I just hit the issue somewhere I wouldn't expect it. Let's say I want to remove new lines from file, but only some of them. It's obvious to me how to get rid of them all, and it's also what is described everywhere. But while it's easy to replace all Us with Os and all new lines with 'bla', how do I remove new lines from lines starting with U only? I tried following without any success:
perl -pe 's/\nU/U/g' /tmp/nejms.txt perl -pe 's/^U/U/g' /tmp/nejms.txt
In reply to Remove SOME new lines by RenMcCourtey
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |