I want to replace all occurrences of certain characters in my file with words. My question is: can I do this for all characters using one command. I use the following command to replace each occurrence of "a" with "apples"
sed 's/a/apple/g' sample.txt
I do not want to write 3 or 4 similar commands to replace each occurrence of "b", "c", "d" with a few words. Is there any way to expand the above command according to my need or do I need to use the same three times?
source share