I tried to execute the multiple commands in a single line using &&, but it isn't working in the following case. It just executes the first sudo command alone.
sudo /usr/bin/rootsh -i -u ditest && Set_proj && 1
Note: Only the first one is Sudo command and the remaining are a normal ones. I already tried using the following command. But it doesn't works
sudo /usr/bin/rootsh -i -u 'ditest && Set_proj && 1'
Multiple command doesn't works even though if I enter "Set_Proj && 1" after executing the first command. Only the first command is executed (Set_proj).
In other cases multiline commands are working fine. Eg: cd jtest && ls
Edited: Its not a duplicate of how to run two commands in sudo?. I described clearly that I haven't used multiple sudo commands. Once logged into putty, the command sequence will be
jacob:/home/users/jacob: sudo /usr/bin/rootsh -i -u ditest
[ditest] ditest> Set_Proj ***List of projectes displayed***
> 1 ***Select any project***