#!/bin/ksh
user1=`who am i|awk '{ print $1 }'`
echo $user1
==================
above is my script
This works from prompt
however it does not work from cron
please help
Printable View
#!/bin/ksh
user1=`who am i|awk '{ print $1 }'`
echo $user1
==================
above is my script
This works from prompt
however it does not work from cron
please help
You can also implement this by placing the variables in the function, it will give you an opportunity to bring them anywhere.