I'm working on a script that will allow me to load up a screen from a user via sudo and su -c. However, when I use it, it will just show the shell of the user:sudo su -c script /dev/null; screen -r $2 $1Forgive me if this is something relatively stupid, I am new to batch scripting. As it stands, it executes /dev/null (used to make accessing the screen in su possible).. but doesn't connect to the screen. I'm sure that the screen name is accurate and so is the user I am logging in as.
Script to su -c into a screen is not working as intended
shell;shell script;sudo;gnu screen;su