unix2dos

来自「AT91所有开发板的资料 AT91所有开发板的资料」· 代码 · 共 48 行

TXT
48
字号
#! /bin/sh ## unix2dos - crude use of zip/unzip to convert CR/LF to LF#usage () {echo "  Usage: unix2dos <filename> .. <filename>";echo "  Converts a number of files from Unix (LF) to DOS (CR/LF)"exit 1 }convert () {        echo "converting $FILE from Unix to DOS"	zip -l /tmp/$$.zip $FILE > /dev/null	unzip -o /tmp/$$.zip > /dev/null	rm -f /tmp/$$.zip}# check argcif [ $# = 0 ]then	usagefi# do they need help?case "$1" in	"-h" | "--help" | "-help") usage	exit 1esac# check to see if there is a source fileFILE=$1if [ ! -f $FILE ] then	echo "unix2dos: can't find $FILE" >&2	exit 1fi# convert the filesfor i in $*do    FILE=$i    convertdoneexit 0

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?