Identifier in shell

Dear guys I need help here with syntax, I am trying to start

script

command to capture all user activities every day, I want the log file of each user to be named with his login ID + date time to overcome the possibility of over writing the log file if he logoff and login again. Here is was I wrote in the .profile of each user.

TIMESTAMP=(date | nawk '{print $2 $3 $4}')
script /tmp/daily_activity/$LOGNAME.$TIMESTAMP.txt

it seems not working the problem here is with the TIMESTAMP syntax i guess, appreciated all the help

OS is Solaris 10

Try this

TIMESTAMP=$(date '+%Y%m%d%H%M%S')

you missed the $

TIMESTAMP=$(date | nawk '{print $2 $3 $4}')

thanks for the help guys i tried both same error

-sh: syntax error: `TIMESTAMP=$' unexpected

then, use back ticks

TIMESTAMP=`date | nawk '{print $2 $3 $4}'`

thanks so much itkamaraj it works perfect.