Running multiple commands with su in Bash

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
8
down vote

favorite












I would like to use su -c to run as root multiple commands altogether. I don't want to use an extra script for this.



I tried the following:



su root -c "tcpdump -i wlan0 -s 1500 -w CCCCCC & " -c "ls -lh"


but it executes only the ls not the first one.



I tried the following:



su root -c "tcpdump -i wlan0 -s 1500 -w CCCCCC & ; ls -lh;"


but it says that there is an error with the semicolon ;.



Do you know how to do that?










share|improve this question















migrated from stackoverflow.com Apr 4 '11 at 20:00


This question came from our site for professional and enthusiast programmers.


















    up vote
    8
    down vote

    favorite












    I would like to use su -c to run as root multiple commands altogether. I don't want to use an extra script for this.



    I tried the following:



    su root -c "tcpdump -i wlan0 -s 1500 -w CCCCCC & " -c "ls -lh"


    but it executes only the ls not the first one.



    I tried the following:



    su root -c "tcpdump -i wlan0 -s 1500 -w CCCCCC & ; ls -lh;"


    but it says that there is an error with the semicolon ;.



    Do you know how to do that?










    share|improve this question















    migrated from stackoverflow.com Apr 4 '11 at 20:00


    This question came from our site for professional and enthusiast programmers.
















      up vote
      8
      down vote

      favorite









      up vote
      8
      down vote

      favorite











      I would like to use su -c to run as root multiple commands altogether. I don't want to use an extra script for this.



      I tried the following:



      su root -c "tcpdump -i wlan0 -s 1500 -w CCCCCC & " -c "ls -lh"


      but it executes only the ls not the first one.



      I tried the following:



      su root -c "tcpdump -i wlan0 -s 1500 -w CCCCCC & ; ls -lh;"


      but it says that there is an error with the semicolon ;.



      Do you know how to do that?










      share|improve this question















      I would like to use su -c to run as root multiple commands altogether. I don't want to use an extra script for this.



      I tried the following:



      su root -c "tcpdump -i wlan0 -s 1500 -w CCCCCC & " -c "ls -lh"


      but it executes only the ls not the first one.



      I tried the following:



      su root -c "tcpdump -i wlan0 -s 1500 -w CCCCCC & ; ls -lh;"


      but it says that there is an error with the semicolon ;.



      Do you know how to do that?







      bash su






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Feb 15 '17 at 19:46









      codeforester

      368314




      368314










      asked Apr 4 '11 at 14:14









      Abruzzo Forte e Gentile

      194136




      194136




      migrated from stackoverflow.com Apr 4 '11 at 20:00


      This question came from our site for professional and enthusiast programmers.






      migrated from stackoverflow.com Apr 4 '11 at 20:00


      This question came from our site for professional and enthusiast programmers.






















          5 Answers
          5






          active

          oldest

          votes

















          up vote
          12
          down vote



          accepted










          This command runs fine:



          su root -c "date; ls -lh"


          But in this command:



          su root -c "tcpdump -i wlan0 -s 1500 -w CCCCCC & ; ls -lh;"


          Since you have & before ; therefore you are getting errors. Try removing & and re-executing the command.



          Or you can run your command like this:



          su root -c "(tcpdump -i wlan0 -s 1500 -w CCCCCC &); ls -lh"





          share|improve this answer




















          • Of course, there’s no reason to add parentheses unless the OP really really really wants to type a ; between the tcpdump and ls commands — just leave out the semicolons and it will work.
            – G-Man
            Feb 15 '17 at 20:04

















          up vote
          2
          down vote













          As anubhava says, your



          su root -c "tcpdump -i wlan0 -s 1500 -w CCCCCC & ; ls -lh;"


          command is failing because you’re not allowed to have
          & followed immediately by ;
          You can see this just by typing the commands directly into the shell:




          • true & true  works


          • true & ; true doesn’t work

          If you want the tcpdump command to run in the background,
          remove the ;, as in



          su root -c "tcpdump -i wlan0 -s 1500 -w CCCCCC & ls -lh;"


          (and you don't need the ; at the end, either, but it doesn’t hurt).






          share|improve this answer





























            up vote
            1
            down vote













            I think the nohup command will get you what you want too... tcpdump running in the background (no ampersand necessary):



            su root -c "nohup tcpdump -i wlan0 -s 1500 -w CCCCCC ; ls -lh"





            share|improve this answer




















            • Hi I think so. NOHUP leaves commands running in background even when a user disconnect. I didn't remember that. Thanks a lot.
              – Abruzzo Forte e Gentile
              Apr 4 '11 at 15:34










            • (1) It’s good to use nohup when you run commands in the background, but that really has nothing to do with this question.  (2) This answer is wrong — nohup by itself does not cause a command to run in the background; you still have to type & (which leaves us back where we started, with a syntax error in the command).
              – G-Man
              Feb 15 '17 at 20:11

















            up vote
            0
            down vote













            Just to add to Anubhava's excellent answer:



            You could use as well, like this:



            su root -c " tcpdump -i wlan0 -s 1500 -w CCCCCC & ; ls -lh"


            is a little more efficient than () in that it doesn't create a sub shell. does need a space after and a ; before unless we have an & already.






            share|improve this answer






















            • Of course, there’s no reason to add braces or parentheses at all unless the user really really really wants to type a ; between the tcpdump and ls commands — just leave out the semicolon and it will work.
              – G-Man
              Feb 15 '17 at 20:05


















            up vote
            -1
            down vote













            Use && to separate your commands like so:



            $ su -c "ls && ls"





            share|improve this answer




















            • Auch..that's my error. I wanted to run the process in background but I was not aware of this && to separate commands. Thx
              – Abruzzo Forte e Gentile
              Apr 4 '11 at 15:35






            • 2




              && means "Only execute the second command if the first succeeded". If your first command errors out, the second one won't run. This is usually good, but I would hesitate to describe && as purely a separator.
              – Leons
              Feb 21 '13 at 15:50










            • And, if you want to run the tcpdump process in the background, && does you no good whatsoever.
              – G-Man
              Feb 15 '17 at 20:14











            Your Answer








            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "106"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            convertImagesToLinks: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













             

            draft saved


            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f10601%2frunning-multiple-commands-with-su-in-bash%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            5 Answers
            5






            active

            oldest

            votes








            5 Answers
            5






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            12
            down vote



            accepted










            This command runs fine:



            su root -c "date; ls -lh"


            But in this command:



            su root -c "tcpdump -i wlan0 -s 1500 -w CCCCCC & ; ls -lh;"


            Since you have & before ; therefore you are getting errors. Try removing & and re-executing the command.



            Or you can run your command like this:



            su root -c "(tcpdump -i wlan0 -s 1500 -w CCCCCC &); ls -lh"





            share|improve this answer




















            • Of course, there’s no reason to add parentheses unless the OP really really really wants to type a ; between the tcpdump and ls commands — just leave out the semicolons and it will work.
              – G-Man
              Feb 15 '17 at 20:04














            up vote
            12
            down vote



            accepted










            This command runs fine:



            su root -c "date; ls -lh"


            But in this command:



            su root -c "tcpdump -i wlan0 -s 1500 -w CCCCCC & ; ls -lh;"


            Since you have & before ; therefore you are getting errors. Try removing & and re-executing the command.



            Or you can run your command like this:



            su root -c "(tcpdump -i wlan0 -s 1500 -w CCCCCC &); ls -lh"





            share|improve this answer




















            • Of course, there’s no reason to add parentheses unless the OP really really really wants to type a ; between the tcpdump and ls commands — just leave out the semicolons and it will work.
              – G-Man
              Feb 15 '17 at 20:04












            up vote
            12
            down vote



            accepted







            up vote
            12
            down vote



            accepted






            This command runs fine:



            su root -c "date; ls -lh"


            But in this command:



            su root -c "tcpdump -i wlan0 -s 1500 -w CCCCCC & ; ls -lh;"


            Since you have & before ; therefore you are getting errors. Try removing & and re-executing the command.



            Or you can run your command like this:



            su root -c "(tcpdump -i wlan0 -s 1500 -w CCCCCC &); ls -lh"





            share|improve this answer












            This command runs fine:



            su root -c "date; ls -lh"


            But in this command:



            su root -c "tcpdump -i wlan0 -s 1500 -w CCCCCC & ; ls -lh;"


            Since you have & before ; therefore you are getting errors. Try removing & and re-executing the command.



            Or you can run your command like this:



            su root -c "(tcpdump -i wlan0 -s 1500 -w CCCCCC &); ls -lh"






            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Apr 4 '11 at 14:20









            anubhava

            36135




            36135











            • Of course, there’s no reason to add parentheses unless the OP really really really wants to type a ; between the tcpdump and ls commands — just leave out the semicolons and it will work.
              – G-Man
              Feb 15 '17 at 20:04
















            • Of course, there’s no reason to add parentheses unless the OP really really really wants to type a ; between the tcpdump and ls commands — just leave out the semicolons and it will work.
              – G-Man
              Feb 15 '17 at 20:04















            Of course, there’s no reason to add parentheses unless the OP really really really wants to type a ; between the tcpdump and ls commands — just leave out the semicolons and it will work.
            – G-Man
            Feb 15 '17 at 20:04




            Of course, there’s no reason to add parentheses unless the OP really really really wants to type a ; between the tcpdump and ls commands — just leave out the semicolons and it will work.
            – G-Man
            Feb 15 '17 at 20:04












            up vote
            2
            down vote













            As anubhava says, your



            su root -c "tcpdump -i wlan0 -s 1500 -w CCCCCC & ; ls -lh;"


            command is failing because you’re not allowed to have
            & followed immediately by ;
            You can see this just by typing the commands directly into the shell:




            • true & true  works


            • true & ; true doesn’t work

            If you want the tcpdump command to run in the background,
            remove the ;, as in



            su root -c "tcpdump -i wlan0 -s 1500 -w CCCCCC & ls -lh;"


            (and you don't need the ; at the end, either, but it doesn’t hurt).






            share|improve this answer


























              up vote
              2
              down vote













              As anubhava says, your



              su root -c "tcpdump -i wlan0 -s 1500 -w CCCCCC & ; ls -lh;"


              command is failing because you’re not allowed to have
              & followed immediately by ;
              You can see this just by typing the commands directly into the shell:




              • true & true  works


              • true & ; true doesn’t work

              If you want the tcpdump command to run in the background,
              remove the ;, as in



              su root -c "tcpdump -i wlan0 -s 1500 -w CCCCCC & ls -lh;"


              (and you don't need the ; at the end, either, but it doesn’t hurt).






              share|improve this answer
























                up vote
                2
                down vote










                up vote
                2
                down vote









                As anubhava says, your



                su root -c "tcpdump -i wlan0 -s 1500 -w CCCCCC & ; ls -lh;"


                command is failing because you’re not allowed to have
                & followed immediately by ;
                You can see this just by typing the commands directly into the shell:




                • true & true  works


                • true & ; true doesn’t work

                If you want the tcpdump command to run in the background,
                remove the ;, as in



                su root -c "tcpdump -i wlan0 -s 1500 -w CCCCCC & ls -lh;"


                (and you don't need the ; at the end, either, but it doesn’t hurt).






                share|improve this answer














                As anubhava says, your



                su root -c "tcpdump -i wlan0 -s 1500 -w CCCCCC & ; ls -lh;"


                command is failing because you’re not allowed to have
                & followed immediately by ;
                You can see this just by typing the commands directly into the shell:




                • true & true  works


                • true & ; true doesn’t work

                If you want the tcpdump command to run in the background,
                remove the ;, as in



                su root -c "tcpdump -i wlan0 -s 1500 -w CCCCCC & ls -lh;"


                (and you don't need the ; at the end, either, but it doesn’t hurt).







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Apr 13 '17 at 12:36









                Community

                1




                1










                answered Feb 15 '17 at 19:57









                G-Man

                12.3k92961




                12.3k92961




















                    up vote
                    1
                    down vote













                    I think the nohup command will get you what you want too... tcpdump running in the background (no ampersand necessary):



                    su root -c "nohup tcpdump -i wlan0 -s 1500 -w CCCCCC ; ls -lh"





                    share|improve this answer




















                    • Hi I think so. NOHUP leaves commands running in background even when a user disconnect. I didn't remember that. Thanks a lot.
                      – Abruzzo Forte e Gentile
                      Apr 4 '11 at 15:34










                    • (1) It’s good to use nohup when you run commands in the background, but that really has nothing to do with this question.  (2) This answer is wrong — nohup by itself does not cause a command to run in the background; you still have to type & (which leaves us back where we started, with a syntax error in the command).
                      – G-Man
                      Feb 15 '17 at 20:11














                    up vote
                    1
                    down vote













                    I think the nohup command will get you what you want too... tcpdump running in the background (no ampersand necessary):



                    su root -c "nohup tcpdump -i wlan0 -s 1500 -w CCCCCC ; ls -lh"





                    share|improve this answer




















                    • Hi I think so. NOHUP leaves commands running in background even when a user disconnect. I didn't remember that. Thanks a lot.
                      – Abruzzo Forte e Gentile
                      Apr 4 '11 at 15:34










                    • (1) It’s good to use nohup when you run commands in the background, but that really has nothing to do with this question.  (2) This answer is wrong — nohup by itself does not cause a command to run in the background; you still have to type & (which leaves us back where we started, with a syntax error in the command).
                      – G-Man
                      Feb 15 '17 at 20:11












                    up vote
                    1
                    down vote










                    up vote
                    1
                    down vote









                    I think the nohup command will get you what you want too... tcpdump running in the background (no ampersand necessary):



                    su root -c "nohup tcpdump -i wlan0 -s 1500 -w CCCCCC ; ls -lh"





                    share|improve this answer












                    I think the nohup command will get you what you want too... tcpdump running in the background (no ampersand necessary):



                    su root -c "nohup tcpdump -i wlan0 -s 1500 -w CCCCCC ; ls -lh"






                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Apr 4 '11 at 14:38







                    mcmap


















                    • Hi I think so. NOHUP leaves commands running in background even when a user disconnect. I didn't remember that. Thanks a lot.
                      – Abruzzo Forte e Gentile
                      Apr 4 '11 at 15:34










                    • (1) It’s good to use nohup when you run commands in the background, but that really has nothing to do with this question.  (2) This answer is wrong — nohup by itself does not cause a command to run in the background; you still have to type & (which leaves us back where we started, with a syntax error in the command).
                      – G-Man
                      Feb 15 '17 at 20:11
















                    • Hi I think so. NOHUP leaves commands running in background even when a user disconnect. I didn't remember that. Thanks a lot.
                      – Abruzzo Forte e Gentile
                      Apr 4 '11 at 15:34










                    • (1) It’s good to use nohup when you run commands in the background, but that really has nothing to do with this question.  (2) This answer is wrong — nohup by itself does not cause a command to run in the background; you still have to type & (which leaves us back where we started, with a syntax error in the command).
                      – G-Man
                      Feb 15 '17 at 20:11















                    Hi I think so. NOHUP leaves commands running in background even when a user disconnect. I didn't remember that. Thanks a lot.
                    – Abruzzo Forte e Gentile
                    Apr 4 '11 at 15:34




                    Hi I think so. NOHUP leaves commands running in background even when a user disconnect. I didn't remember that. Thanks a lot.
                    – Abruzzo Forte e Gentile
                    Apr 4 '11 at 15:34












                    (1) It’s good to use nohup when you run commands in the background, but that really has nothing to do with this question.  (2) This answer is wrong — nohup by itself does not cause a command to run in the background; you still have to type & (which leaves us back where we started, with a syntax error in the command).
                    – G-Man
                    Feb 15 '17 at 20:11




                    (1) It’s good to use nohup when you run commands in the background, but that really has nothing to do with this question.  (2) This answer is wrong — nohup by itself does not cause a command to run in the background; you still have to type & (which leaves us back where we started, with a syntax error in the command).
                    – G-Man
                    Feb 15 '17 at 20:11










                    up vote
                    0
                    down vote













                    Just to add to Anubhava's excellent answer:



                    You could use as well, like this:



                    su root -c " tcpdump -i wlan0 -s 1500 -w CCCCCC & ; ls -lh"


                    is a little more efficient than () in that it doesn't create a sub shell. does need a space after and a ; before unless we have an & already.






                    share|improve this answer






















                    • Of course, there’s no reason to add braces or parentheses at all unless the user really really really wants to type a ; between the tcpdump and ls commands — just leave out the semicolon and it will work.
                      – G-Man
                      Feb 15 '17 at 20:05















                    up vote
                    0
                    down vote













                    Just to add to Anubhava's excellent answer:



                    You could use as well, like this:



                    su root -c " tcpdump -i wlan0 -s 1500 -w CCCCCC & ; ls -lh"


                    is a little more efficient than () in that it doesn't create a sub shell. does need a space after and a ; before unless we have an & already.






                    share|improve this answer






















                    • Of course, there’s no reason to add braces or parentheses at all unless the user really really really wants to type a ; between the tcpdump and ls commands — just leave out the semicolon and it will work.
                      – G-Man
                      Feb 15 '17 at 20:05













                    up vote
                    0
                    down vote










                    up vote
                    0
                    down vote









                    Just to add to Anubhava's excellent answer:



                    You could use as well, like this:



                    su root -c " tcpdump -i wlan0 -s 1500 -w CCCCCC & ; ls -lh"


                    is a little more efficient than () in that it doesn't create a sub shell. does need a space after and a ; before unless we have an & already.






                    share|improve this answer














                    Just to add to Anubhava's excellent answer:



                    You could use as well, like this:



                    su root -c " tcpdump -i wlan0 -s 1500 -w CCCCCC & ; ls -lh"


                    is a little more efficient than () in that it doesn't create a sub shell. does need a space after and a ; before unless we have an & already.







                    share|improve this answer














                    share|improve this answer



                    share|improve this answer








                    edited Apr 13 '17 at 12:36









                    Community

                    1




                    1










                    answered Feb 15 '17 at 19:34









                    codeforester

                    368314




                    368314











                    • Of course, there’s no reason to add braces or parentheses at all unless the user really really really wants to type a ; between the tcpdump and ls commands — just leave out the semicolon and it will work.
                      – G-Man
                      Feb 15 '17 at 20:05

















                    • Of course, there’s no reason to add braces or parentheses at all unless the user really really really wants to type a ; between the tcpdump and ls commands — just leave out the semicolon and it will work.
                      – G-Man
                      Feb 15 '17 at 20:05
















                    Of course, there’s no reason to add braces or parentheses at all unless the user really really really wants to type a ; between the tcpdump and ls commands — just leave out the semicolon and it will work.
                    – G-Man
                    Feb 15 '17 at 20:05





                    Of course, there’s no reason to add braces or parentheses at all unless the user really really really wants to type a ; between the tcpdump and ls commands — just leave out the semicolon and it will work.
                    – G-Man
                    Feb 15 '17 at 20:05











                    up vote
                    -1
                    down vote













                    Use && to separate your commands like so:



                    $ su -c "ls && ls"





                    share|improve this answer




















                    • Auch..that's my error. I wanted to run the process in background but I was not aware of this && to separate commands. Thx
                      – Abruzzo Forte e Gentile
                      Apr 4 '11 at 15:35






                    • 2




                      && means "Only execute the second command if the first succeeded". If your first command errors out, the second one won't run. This is usually good, but I would hesitate to describe && as purely a separator.
                      – Leons
                      Feb 21 '13 at 15:50










                    • And, if you want to run the tcpdump process in the background, && does you no good whatsoever.
                      – G-Man
                      Feb 15 '17 at 20:14















                    up vote
                    -1
                    down vote













                    Use && to separate your commands like so:



                    $ su -c "ls && ls"





                    share|improve this answer




















                    • Auch..that's my error. I wanted to run the process in background but I was not aware of this && to separate commands. Thx
                      – Abruzzo Forte e Gentile
                      Apr 4 '11 at 15:35






                    • 2




                      && means "Only execute the second command if the first succeeded". If your first command errors out, the second one won't run. This is usually good, but I would hesitate to describe && as purely a separator.
                      – Leons
                      Feb 21 '13 at 15:50










                    • And, if you want to run the tcpdump process in the background, && does you no good whatsoever.
                      – G-Man
                      Feb 15 '17 at 20:14













                    up vote
                    -1
                    down vote










                    up vote
                    -1
                    down vote









                    Use && to separate your commands like so:



                    $ su -c "ls && ls"





                    share|improve this answer












                    Use && to separate your commands like so:



                    $ su -c "ls && ls"






                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Apr 4 '11 at 14:20







                    nickgrim


















                    • Auch..that's my error. I wanted to run the process in background but I was not aware of this && to separate commands. Thx
                      – Abruzzo Forte e Gentile
                      Apr 4 '11 at 15:35






                    • 2




                      && means "Only execute the second command if the first succeeded". If your first command errors out, the second one won't run. This is usually good, but I would hesitate to describe && as purely a separator.
                      – Leons
                      Feb 21 '13 at 15:50










                    • And, if you want to run the tcpdump process in the background, && does you no good whatsoever.
                      – G-Man
                      Feb 15 '17 at 20:14

















                    • Auch..that's my error. I wanted to run the process in background but I was not aware of this && to separate commands. Thx
                      – Abruzzo Forte e Gentile
                      Apr 4 '11 at 15:35






                    • 2




                      && means "Only execute the second command if the first succeeded". If your first command errors out, the second one won't run. This is usually good, but I would hesitate to describe && as purely a separator.
                      – Leons
                      Feb 21 '13 at 15:50










                    • And, if you want to run the tcpdump process in the background, && does you no good whatsoever.
                      – G-Man
                      Feb 15 '17 at 20:14
















                    Auch..that's my error. I wanted to run the process in background but I was not aware of this && to separate commands. Thx
                    – Abruzzo Forte e Gentile
                    Apr 4 '11 at 15:35




                    Auch..that's my error. I wanted to run the process in background but I was not aware of this && to separate commands. Thx
                    – Abruzzo Forte e Gentile
                    Apr 4 '11 at 15:35




                    2




                    2




                    && means "Only execute the second command if the first succeeded". If your first command errors out, the second one won't run. This is usually good, but I would hesitate to describe && as purely a separator.
                    – Leons
                    Feb 21 '13 at 15:50




                    && means "Only execute the second command if the first succeeded". If your first command errors out, the second one won't run. This is usually good, but I would hesitate to describe && as purely a separator.
                    – Leons
                    Feb 21 '13 at 15:50












                    And, if you want to run the tcpdump process in the background, && does you no good whatsoever.
                    – G-Man
                    Feb 15 '17 at 20:14





                    And, if you want to run the tcpdump process in the background, && does you no good whatsoever.
                    – G-Man
                    Feb 15 '17 at 20:14


















                     

                    draft saved


                    draft discarded















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f10601%2frunning-multiple-commands-with-su-in-bash%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown






                    Popular posts from this blog

                    How to check contact read email or not when send email to Individual?

                    Bahrain

                    Postfix configuration issue with fips on centos 7; mailgun relay