crontab

I got a crontab like the one below. i know what it does, but I would ike ot understand why a variable X is defined and that will receive the path to the script and then what this portion will do for us :[ -x $X ] && $X

0 2 * * * X=/var/tmp/log_purge.ksh; [ -x $X ] && $X > /dev/null 2>&1

thanks for your help.

I would say it's declared so to shorten the alternative

0 2 * * * [ -x /var/tmp/log_purge.ksh ] && /var/tmp/log_purge.ksh > /dev/null 2>&1

(less typing means less typing mistakes)

thanks,

before knowing vim's power CTRL-X + CTRL-F, i even thought making the filename inside a file as big task.

But after knowing, CTRL+X features, it made my life pretty easy..