I agree with grail. Unless you shortened your actual sed command before you posted it here, the '13g' does not accomplish anything. It simply tells sed to copy the hold buffer to your pattern space. Since you have not put anything in in your hold buffer you simply 'delete' your pattern space. This is also pointless because line #13 has already been printed by the previous command: '1,13p'
You can speed up your sed by
sed -e '13 q'
This will print line 1-13 by default and quit when it encounters line 13.
Last edited by crts; 01-13-2011 at 10:17 PM.