📄 copyright.sh
字号:
#! /bin/sh# /*********************** self documentation **********************/# COPYRIGHT - insert CSM COPYRIGHT lines at top of files in working directory## Usage: copyright file(s)## /**************** end self doc ********************************/# $Author: john $# $Source: /NeXTMount_3.1b/usr/local/cwp/src/cwp/shell/RCS/copyright.sh,v $# $Revision: 1.8 $ ; $Date: 93/06/17 13:44:35 $ROOT=${CWPROOT}BIN=$ROOT/binPATH=/bin:/usr/bin:/usr/ucb:${BIN}tmpfile=/tmp/$$.crightTHISYEAR=`this_year`for i in `ls`do if [ -d $i ] then cd $i $BIN/copyright cd .. elif # C files [ .c = `echo $i | sed 's/.*\.c/.c/'` -o .h = `echo $i |sed 's/.*\.h/.h/'` ] then >$tmpfile echo "/* Copyright (c) Colorado School of Mines, $THISYEAR.*/" >>$tmpfile echo "/* All rights reserved. */" >>$tmpfile echo "" >>$tmpfile cat $i >>$tmpfile mv -f $tmpfile $i elif # Fortran files [ .f = `echo $i | sed 's/.*\.f/.f/'` ] then >$tmpfile echo "* Copyright (c) Colorado School of Mines, $THISYEAR." >>$tmpfile echo "* All rights reserved." >>$tmpfile echo "" >>$tmpfile cat $i >>$tmpfile mv -f $tmpfile $i fidoneexit 0
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -