file2html
来自「《j2ee经典实例详解》的源代码。原书无附带光盘。介绍的是一个在线银行系统的例子」· 代码 · 共 25 行
TXT
25 行
#!/bin/csh# file2html# Convert a (text) file to preformatted html & put results on std outif ("$1" == "" || "$2" != "") then echo "usage: $0 <filename> " echo " converts <file>.<ext> to <file>-<ext>.html" exitendifset OLD = $1set DIR = `dirname $OLD` # No ending "/" in the name. => "." if no dirset EXT = ${OLD:e} # No initial period in the extensionset NAME = `basename $OLD .$EXT` # Remove the extension to get the nameset NEW = $DIR/${NAME}-${EXT}.html # Construct the new name from the parts# Work around a shell script bug# --When the text doesn't end in a NL, the last# --line does not get through sedecho "" >> $OLDecho Creating $NEWrm -f $NEWtext2html $OLD > $NEW
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?