mirror of
https://github.com/Erreur32/cheat.git
synced 2024-10-31 21:11:07 +01:00
9 lines
222 B
Plaintext
9 lines
222 B
Plaintext
# To view the perl version:
|
|
perl -v
|
|
|
|
# Replace string "\n" to newline
|
|
echo -e "foo\nbar\nbaz" | perl -pe 's/\n/\\n/g;'
|
|
|
|
# Replace newline with multiple line to space
|
|
cat test.txt | perl -0pe "s/test1\ntest2/test1 test2/m"
|