I have a bash file, in which I would like to make several changes.
sed -i 's/ / /g' testfile
sed -i -e 's/#[a-z]$//' -e '/^$/d' testfile
sed -i 's/ *$//' testfile
sed '/##=/ r header' testfile
In first command would like to replace TAB with spaces and after that remove comments(there are also comments, which begin with ##) and empty lines. After that would like to insert a file after a specified pattern in my file. Is there something wrong with command ordering?
testfile, there are no quirks of ordering to comment on.