|
inconsistent ls command display at the command prompt & running as a cron job
Sir,
I using the following commands in a file (part of a bigger script):
#!/bin/bash
cd /opt/oracle/bin
ls -lt | tail -1 | awk '{print $6}' >> /tmp/ramb.out
If I run this from the command prompt the result is:
2007-05-16
if I run it as a cron job then I get:
May
In both cases I need to get:
2007-05-16
Can any help with this?
Thanks in advance.
|