Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

linux up command multiple level of directory

up ()
{
    local old="$PWD"
    for i in $(seq "${1:-1}"); do
        cd ..
    done
    OLDPWD="$old"
}
Source by askubuntu.com #
 
PREVIOUS NEXT
Tagged: #linux #command #multiple #level #directory
ADD COMMENT
Topic
Name
6+8 =