Creating a file

Hi,

I want to check whether the file exist and if not create the file and change the file ownership and permission from the ksh.
Your help is appreciated.

You can use test operator.
like
:smiley:

if [[ -f /tmp/filename]]; then
echo " file Exists"
else
touch /tmp/filename
chmod 777 /tmp/filename
fi

Basic example.

test -f $file || touch $file && chmod 600 $file && chown $user $file