Quantcast
Channel: How do i run su username -c "command " in a sequence - Super User
Viewing all articles
Browse latest Browse all 3

How do i run su username -c "command " in a sequence

$
0
0

am trying to write a script that runs commands in a sequence as a user but su keeps doing every command at the same time instead of running them one after another

the script looks like

su username -c "cd /home/username/ ; git something.com"su username -c "cd /home/username/ ; git something2.com"su username -c "cd /home/username/ ; git something3.com"

Viewing all articles
Browse latest Browse all 3

Trending Articles