Perl One Liner on Linux Command - Replace all word

Yuki Kimoto - SPVM Author - Mar 9 '21 - - Dev Community

Replace all apple to orange by Perl one liner on Linux.

find * | xargs perl -pi -e 's/apple/orange/g';
Enter fullscreen mode Exit fullscreen mode
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .