name="Rahul Kapgate arg"
temp=$name
./a.out -a "$temp"
This will give me a following output :: Rahul Kapgate arg
Instead of ./a.out -a "$temp"
if i put following logic then it is generating differant output.
cmd="./a.out -a \"$temp\""
$cmd
Output :: "Rahul
[ a.out is nothing but the printing the 1st parameter through C unsing optarg())
I am expecting to generate the same output using 2nd option plz help me.