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

📄 nohup.bash

📁 UNIX下SH的实现源码
💻 BASH
字号:
## BASH VERSION OF nohup COMMAND#ctype(){	path=$(builtin type -p $cmd | sed 1q)	if [ -n "$path" ]; then		echo "$path"		return 0	else		case "$cmd" in		*/*)	[ -x "$cmd ] && { echo "$cmd" ; return 0; } ;;		  *)	case "$(builtin type -t $cmd)" in			"")	return 1;;			*)	echo "$cmd" ; return 0;;			esac ;;		esac	fi	return 1}trap '' HUP		# ignore hangupcommand=$(ctype "$1")oldmask=$(umask)umask u=rw,og=		# default mode for nohup.outexec 0< /dev/null	# disconnect inputif [ -t 1 ]; then	# redirect output if necessary	if [ -w . ]; then		echo 'Sending output to nohup.out'		exec >> nohup.out	else	echo "Sending output to $HOME/nohup.out"		exec >> $HOME/nohup.out	fifiumask "$oldmask"# direct unit 2 to a fileif [ -t 2 ]; then	exec 2>&1fi# run the commandcase $command in*/*)	exec "$@"	;;time)	eval "$@"	;;*)	"$@"	;;esac

⌨️ 快捷键说明

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