Bash function to dynamically move N directories above the current directory
If you're writing this as a shell function, then you don't need to eval.

The indentation could be done more idiomatically.  By using elif, you can eliminate one level of indentation and make the code structure clearer.

up() {
    if [ -z "$1" ]; then 
        cd ..
    elif [ "$1" -eq "$1" ]; then
        if [ "$1" -lt 0 ]; then
            echo "First argument is not a positive integer"
        else
            for i in `seq 1 $1`; do
                cd ..
            done
            pwd
        fi
    else
        echo "First argument is not an integer"
    fi
}


Your question is very similar to this one.  The main problem, as you have already noted in your own comment, is that by doing multiple cd .. in sequence instead of one cd ../../.., you would be inserting many hops into the directory history.  Then, cd - or referencing $OLDPWD wouldn't work as expected.