I have two scripted files, say file1 and file2. I want to take the content of file1, change character a to A in file1 and append the output to file2 without modifying the content of file1. I'm trying with:
sed -i ‘s/a/A/g’ file1 >> file2
but this just changes the a to A in file1.
ycommand that is more idiomatic for single character replacements:sed 'y/a/A/' file1 >> file2– steeldriver Sep 03 '22 at 17:45ypose an advantage to using thescommand? – BeastOfCaerbannog Sep 03 '22 at 17:56trrather thansedin this application. – steeldriver Sep 03 '22 at 18:18