1
0
mirror of https://github.com/cheat/cheat.git synced 2025-07-13 09:11:58 +02:00

Merge pull request from shigemk2/shigemk2-patch-1

Add cheatsheet perl
This commit is contained in:
Chris Allen Lane
2017-12-19 12:38:25 -05:00
committed by GitHub

8
cheat/cheatsheets/perl Normal file

@ -0,0 +1,8 @@
# 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"