#!/bin/bash #author by luweinet@hhstu.edu.cn #Apr 27 2005 #for change file to unix format or change to dos format.: while getopts ud option do case $option in u) cat $2 | sed 's/^M$//' > $2.unix & ;; #M by Ctrl+V,Ctrl+M d) cat $2 | sed 's/$'''/`echo ///r`/''> $2.dos & ;; *) "echo Usage:./cinput filename {unix | dos}" esac done