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

📄 aliasconv.sh

📁 UNIX下SH的实现源码
💻 SH
字号:
#! /bin/bash## aliasconv.sh - convert csh aliases to bash aliases and functions## usage: aliasconv.sh## Chet Ramey# chet@po.cwru.edu#trap 'rm -f /tmp/cb$$.?' 0 1 2 3 6 15T='	'cat << \EOF >/tmp/cb$$.1mkalias (){	if [ "x$2" = "x" ]; then		echo alias ${1}="''"	elif echo "$2" | egrep -s '(\!|#)' >/dev/null 2>&1; then		comm=`echo $2 | sed  's/\\!\*/"$\@"/g				      s/\\!:\([1-9]\)/"$\1"/g			              s/#/\#/g'`		echo $1 \(\) "{" command "$comm"  "; }"	else		echo alias ${1}=\'`echo "${2}" | sed "s:':'\\\\\\\\'':"`\'	fi}EOF# the first thing we want to do is to protect single quotes in the alias,# since they whole thing is going to be surrounded by single quotes when# passed to mkaliassed -e "s:':\\'\\\'\\':" -e "s/^\([a-zA-Z0-9_-]*\)$T\(.*\)$/mkalias \1 '\2'/" >>/tmp/cb$$.1sh /tmp/cb$$.1 | sed -e 's/\$cwd/\$PWD/g' \		     -e 's/\$term/\$TERM/g' \		     -e 's/\$home/\$HOME/g' \		     -e 's/\$user/\$USER/g' \		     -e 's/\$prompt/\$PS1/g'exit 0

⌨️ 快捷键说明

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