⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 prepend

📁 伯克利做的SFTP安全文件传输协议
💻
字号:
#! /bin/csh -f# script to prepend a single line of text to a text fileif ( "$2" == "" ) then  echo "usage: $0 filename line-to-prepend"  exitendif# grab filenameset fname = $1# shift arguments, so $* can refer to everythingshift# if file doesn't exist, just create it and bailif ( -e $fname ) then  # it existselse  echo $* > $fname  exitendif# copy the existing file to a temporary file ($$ is pid)set tmp = /tmp/prepend.$$mv $fname $tmp# write the first lineecho $* > $fname# append the remainder of the original filecat $tmp >> $fname# remove the temporary filerm $tmp

⌨️ 快捷键说明

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