Hi guys,
I am learning how to use regular expression. Can I directly find a matching string and replace it in the same file?I mean input and outout is the same file.
For example:
test.txt :
Hello
All
Sed
Awk
wall
google
after I use "s/(.){2,}\1.*//g",test.txt turn into
heo
A
sed
Awk
wa
gle
I am learning how to use regular expression. Can I directly find a matching string and replace it in the same file?I mean input and outout is the same file.
For example:
test.txt :
Hello
All
Sed
Awk
wall
after I use "s/(.){2,}\1.*//g",test.txt turn into
heo
A
sed
Awk
wa
gle