The command to convert all \n in a file to another string – very useful for list code generation.
perl -ne 's/\\n/\',\'/g;print;' file.txt>new.txt
Byte sized tech know-how.
The command to convert all \n in a file to another string – very useful for list code generation.
perl -ne 's/\\n/\',\'/g;print;' file.txt>new.txt
Copyright © 2024 Txt
Hi,
Why not try the simple ‘tr’ in Linux that does not expect you to have perl or any other dependencies.