Use .sh when the file contains shell commands; use .sed when it only has sed -f commands and sed -f loads.
For example, call script.sh :
#!/bin/sh sed 's/foo/bar/g'
For now, this will be script.sed :
s/foo/bar/g
Editors like Vim will provide you with the correct highlighting based on .sh and .sed .
source share