ACC SHELL

Path : /etc/
File Upload :
Current File : //etc/bash_command_not_found

command_not_found_handle() {

    export TEXTDOMAINDIR=/usr/share/locale
    export TEXTDOMAIN=command-not-found

    local cmd state rest
    local -i pid ppid pgrp session tty_nr tpgid

    # do not run when inside Midnight Commander or within a Pipe
    if test -n "$MC_SID" -o ! -t 1 ; then
        echo $"$1: command not found"
        return 127
    fi

    # do not run when within a subshell
    read pid cmd state ppid pgrp session tty_nr tpgid rest  < /proc/self/stat
    if test $$ -eq $tpgid ; then
        echo "$1: command not found"
        return 127
    fi

    # test for /usr/sbin and /sbin
    if test -x "/usr/sbin/$1" -o -x "/sbin/$1" ; then
        if test -x "/usr/sbin/$1" ; then prefix='/usr' ; else prefix='' ; fi
        echo $"Absolute path to '$1' is '$prefix/sbin/$1', so running it may require superuser privileges (eg. root)."
        return 127
    fi

    if test -n "$COMMAND_NOT_FOUND_AUTO" ; then
        # call command-not-found directly
        test -x /usr/bin/python && test -x /usr/bin/command-not-found && /usr/bin/python /usr/bin/command-not-found "$1" zypp
    else
        # print only info about command-not-found
        echo -e $"If '$1' is not a typo you can use command-not-found to lookup the package that contains it, like this:
    cnf $1"
    fi

    return 127
}

ACC SHELL 2018