dirs

来自「Berkely的学生写的」· 代码 · 共 35 行

TXT
35
字号
#!/bin/sh# Chapter 14 - Sharing data between functions# This function implements the csh dirs command that lists# the current directory stack.# You will need to "source" this file into your environment# using the . command.dirs() {     # save IFS, then set it to : to access the    # the items in _DIR_STACK individually.    OLDIFS="$IFS"    IFS=:    # if there are directories on the stack print each     # one followed by a space    if [ -n "$_DIR_STACK" ] ; then	for i in $_DIR_STACK    	do            /bin/echo "$i \c"    	done    fi    # add a new line after all entries in _DIR_STACK     # have been printed    echo    # restore IFS    IFS="$OLDIFS"}

⌨️ 快捷键说明

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