I always thought ed would be a perfect match. Line-based instead of having to manage cursor movements.