Pipe output missing date?

I'd like to have the output from this script piped to a text file that has the date at the beginning of it. For example, my ideal would be something like this

$./run_script.sh
$ls *.out
2013-Feb-26-output_filename.out

Here's the code I'm using.

#! /bin/ksh

DAT=`date '+%Y-%b-%d'`

for d in /dir1 /dir2 /dir3

do
   df -h $d|tail -1

done|>> $DAT_disk_usage.out

Instead of the output I'm expecting I get nothing... what am I missing?

for d in /dir1 /dir2 /dir3
        df -h "$d" | tail -1
done >> "${DAT}_disk_usage.out"
1 Like

That worked like a champ. Thanks!