In the below program, I am able to print the ppid notable to print pid,
I want to know the answer, pid is important so I ndeed to print it
#! /bin/bash
echo " a.display PTD of parent and child "
echo " b. copy the file content "
echo " enter your choice "
read ch
case $ch in
a)
echo " parent pid is $PPID"
echo " pid is $PID"
;;
b)
echo "enter a source file"
read f1
echo "enter destination file "
read f2
if [ -f $f1 ]
then
cp $f1 $f2
else
echo "file does not exist"
fi
;;
esac