#!/bin/sh
date
The above script will print the current date and time. If that's not what you meant, please explain in more detail.
More generally, your question does not appear to be related to Sun Studio. You probably need to get a Linux reference book if you are concerned about Linux specifically. Or you could get a book about whatever is your favorite shell: sh, bash, csh, ksh
O'Reilly publishes many such books
http://www.oreilly.com/pub/topic/linux
that are widely available.