I am trying to pass couple of Variables in sudo command via shell script, but it is not working.
my command works fine without the change_number variable like below
change_number=123456;
echo $profile |su - user1 -c '/tmp/server_upgrade.sh'
Not working(not able to pass variables to su command)
profile=app;
change_number=123456;
echo $profile |su - user1 -c '/tmp/server_upgrade.sh $change_number'