I have run a shell script as a background process using 'nohup' command. I want to see the process id of this, so that I will be able to kill it later on when required.
I tried to collect these details using 'ps' command and could not view this information.
The example given in the referenced thread is relevant, as it tells you a way to get the PID of a background nohup process. And bash and ksh are largely (though not completely) compatible.
That would be one of the few cases where ksh and bash aren't compatible, as ksh has a built-in print command, while bash doesn't. Use echo or printf instead.