Home Nested if failure - Pseudo code sample
Reply: 0

Nested if failure - Pseudo code sample

user1161
1#
user1161 Published in July 16, 2018, 3:08 am

For the past days I've been trying to understand why a script I have is failing, and execution all refers, in the error, to this part of the code (pseudo-code for this post):

if [ -z "${removed-unset}" ]; then
    ABC
    else
        if [ "$(date +%u)" == 4 ];  then
            if test `find "ABC" -cmin +2880` then
                if [ ! -f /tmp/ABC ]; then
                    CODE HERE
                        if [[ -s ABC ]]; then
                            CODE HERE
                                if [ -z "${ABC-unset}" ]; then
                                     CODE HERE
                                else
                                     CODE HERE
                                fi
                         else
                             rm ABC
                         fi
                 else
                     CODE HERE
                 fi
             else
                 CODE HERE
             fi
    else
        CODE HERE
    fi
fi

I was wondering if I could have some pointers as to what it is I'm doing wrong here. I apologize for the lack of actual code and the syntax.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.319343 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO