How to? Put logic into an alias...

#2
Hi Mathew,

Code:
(system)  C:\TEMP >%@if[%_dow eq Thu,echo have a nice weekend,echo day of week is: %_dow]
day of week is: Fri
 
(system)  C:\TEMP >%@if[%_dow eq Fri,echo have a nice weekend,echo day of week is: %_dow]
have a nice weekend
 
#4
I have many aliases structured thusly:
alias reciprocal=`iff %1 NE 0 then %+ echo %@eval[ 1 / %1] %+ else %+ echo 0 has no reciprocal %+ endiff`

The advantage over @IF is that only the desired branch is executed, the "false" branch can contain expressions causing failure.