Handle line ending of some types of script