Hi, I guess you're on osx since you mention 'Terminal'. Try with escaping the quotes : sed -n \'$=\' $File.txt and eventually the dollar too : sed -n \'\$=\' $File.txt On archlinux it works without escaping. see you, Charlot