bin sh to unix case in --to -t to echo Using basename --to FORMAT file

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
#! /bin/sh
to="unix"
case "$1" in
--to|-t) to=$2
;;
*) echo "Using: $(basename $0) --to FORMAT filename"
exit 1
;;
esac
vim $3 -c ":set ff=$to|wq"
exit 0