replace string in class bash and azuredevops (ios xamarin pipeline)












1















I am trying to write a bash script to change a string in a class for my azure devops pipeline.But cannot make it work.



Copied the script from
https://github.com/Microsoft/appcenter-build-scripts-examples/blob/master/xamarin/app-constants/appcenter-pre-build.sh



my bash attempt:




  1. Added a bash task (inline script)

  2. Created an env variable API_URL with value ="https://production.com/api"


  3. My Class to change



    namespace Core
    {
    public class AppConstant
    {
    public const string ApiUrl = "https://production.com/api";
    public const string AnotherOne="AAA";
    }
    }



My script



    if [ ! -n "$API_URL" ]
then
echo "You need define the API_URL variable"
exit
fi

APP_CONSTANT_FILE=$(Build.SourcesDirectory)/MyProject/Core/AppConstant.cs

if [ -e "$APP_CONSTANT_FILE" ]
then
echo "Updating ApiUrl to $API_URL in AppConstant.cs"
sed -i '' 's#ApiUrl = "[a-z:./]*"#ApiUrl = "'$API_URL'"#' $APP_CONSTANT_FILE

echo "File content:"
cat $APP_CONSTANT_FILE
fi


why does my variable not change? many thanks










share|improve this question





























    1















    I am trying to write a bash script to change a string in a class for my azure devops pipeline.But cannot make it work.



    Copied the script from
    https://github.com/Microsoft/appcenter-build-scripts-examples/blob/master/xamarin/app-constants/appcenter-pre-build.sh



    my bash attempt:




    1. Added a bash task (inline script)

    2. Created an env variable API_URL with value ="https://production.com/api"


    3. My Class to change



      namespace Core
      {
      public class AppConstant
      {
      public const string ApiUrl = "https://production.com/api";
      public const string AnotherOne="AAA";
      }
      }



    My script



        if [ ! -n "$API_URL" ]
    then
    echo "You need define the API_URL variable"
    exit
    fi

    APP_CONSTANT_FILE=$(Build.SourcesDirectory)/MyProject/Core/AppConstant.cs

    if [ -e "$APP_CONSTANT_FILE" ]
    then
    echo "Updating ApiUrl to $API_URL in AppConstant.cs"
    sed -i '' 's#ApiUrl = "[a-z:./]*"#ApiUrl = "'$API_URL'"#' $APP_CONSTANT_FILE

    echo "File content:"
    cat $APP_CONSTANT_FILE
    fi


    why does my variable not change? many thanks










    share|improve this question



























      1












      1








      1








      I am trying to write a bash script to change a string in a class for my azure devops pipeline.But cannot make it work.



      Copied the script from
      https://github.com/Microsoft/appcenter-build-scripts-examples/blob/master/xamarin/app-constants/appcenter-pre-build.sh



      my bash attempt:




      1. Added a bash task (inline script)

      2. Created an env variable API_URL with value ="https://production.com/api"


      3. My Class to change



        namespace Core
        {
        public class AppConstant
        {
        public const string ApiUrl = "https://production.com/api";
        public const string AnotherOne="AAA";
        }
        }



      My script



          if [ ! -n "$API_URL" ]
      then
      echo "You need define the API_URL variable"
      exit
      fi

      APP_CONSTANT_FILE=$(Build.SourcesDirectory)/MyProject/Core/AppConstant.cs

      if [ -e "$APP_CONSTANT_FILE" ]
      then
      echo "Updating ApiUrl to $API_URL in AppConstant.cs"
      sed -i '' 's#ApiUrl = "[a-z:./]*"#ApiUrl = "'$API_URL'"#' $APP_CONSTANT_FILE

      echo "File content:"
      cat $APP_CONSTANT_FILE
      fi


      why does my variable not change? many thanks










      share|improve this question
















      I am trying to write a bash script to change a string in a class for my azure devops pipeline.But cannot make it work.



      Copied the script from
      https://github.com/Microsoft/appcenter-build-scripts-examples/blob/master/xamarin/app-constants/appcenter-pre-build.sh



      my bash attempt:




      1. Added a bash task (inline script)

      2. Created an env variable API_URL with value ="https://production.com/api"


      3. My Class to change



        namespace Core
        {
        public class AppConstant
        {
        public const string ApiUrl = "https://production.com/api";
        public const string AnotherOne="AAA";
        }
        }



      My script



          if [ ! -n "$API_URL" ]
      then
      echo "You need define the API_URL variable"
      exit
      fi

      APP_CONSTANT_FILE=$(Build.SourcesDirectory)/MyProject/Core/AppConstant.cs

      if [ -e "$APP_CONSTANT_FILE" ]
      then
      echo "Updating ApiUrl to $API_URL in AppConstant.cs"
      sed -i '' 's#ApiUrl = "[a-z:./]*"#ApiUrl = "'$API_URL'"#' $APP_CONSTANT_FILE

      echo "File content:"
      cat $APP_CONSTANT_FILE
      fi


      why does my variable not change? many thanks







      bash azure-devops






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 21 '18 at 10:08







      developer9969

















      asked Nov 21 '18 at 7:42









      developer9969developer9969

      8691025




      8691025
























          1 Answer
          1






          active

          oldest

          votes


















          2














          Your script is correct and will get desired output, only remove the dual apostrophes after sed -i:



          sed -i 's#ApiUrl = "[a-z:./]*"#ApiUrl = "'$API_URL'"#' $APP_CONSTANT_FILE


          However I would also change regexp at least to this, since . (dot) is reserved as any character in regexp:



          sed -i 's#ApiUrl = "[a-z:./]*"#ApiUrl = "'$API_URL'"#' $APP_CONSTANT_FILE


          Or even to this (in order to take whatever characters between quotes):



          sed -i 's#ApiUrl = "[^"]*"#ApiUrl = "'$API_URL'"#' $APP_CONSTANT_FILE


          Test:



          $ cat > developer9969.txt
          namespace Core
          {
          public class AppConstant
          {
          public const string ApiUrl = "https://production.com/api";
          }
          }

          API_URL='https://kubator.com/'
          APP_CONSTANT_FILE='./developer9969.txt'
          sed -i 's#ApiUrl = "[^"]*"#ApiUrl = "'$API_URL'"#' $APP_CONSTANT_FILE

          $ cat $APP_CONSTANT_FILE
          namespace Core
          {
          public class AppConstant
          {
          public const string ApiUrl = "https://kubator.com/";
          }
          }





          share|improve this answer


























          • Hi thanks for your time I am not familiar at all with bash as I come from windows etc.. if I wanted to replace another constant string that is not a url would I need to sed -i 's#ApiUrl = "[a-z:./]*"#ApiUrl = "'$API_URL'"#' $APP_CONSTANT_FILE becomes sed -i 's#myconst = "[a-z:]"#myconst = "'$myconst'"#' $APP_CONSTANT_FILE basically removing "./]*

            – developer9969
            Nov 21 '18 at 8:52











          • This is more regular expression question. Basically means character class and * means repeat 0 or unlimited times. So that's why regular expression [a-z:./] kind matches Your url. I am saying kind because having full regexp for url is tough. At least in Your case I would repair [a-z:./]. Dot must be escaped because is alos regexp reserved as any single character. If You would like to match any non empty aplha (both upper, lower case) string I would suggest regexp: ^[A-Za-z]+$ where ^ is beginning, [A-Za-z] both upple lower alpha, + is repeat one or more times, $ is end

            – Kubator
            Nov 21 '18 at 9:46











          • thanks for your help on this one i guess your are right is more about regex which is another issue i have tried as follows to replace a const but cannot do it sed -i 's#AnotherOne = "^[A-Za-z]+$"#AnotherOne = "'$ANOTHERONE'"#' $APP_CONSTANT_FILE .

            – developer9969
            Nov 21 '18 at 10:13











          • That was generic example, in this case use simply: sed -i 's#AnotherOne = "[^"]*"#AnotherOne = "'$ANOTHERONE'"#' $APP_CONSTANT_FILE

            – Kubator
            Nov 21 '18 at 10:27













          • All working now than you!

            – developer9969
            Nov 21 '18 at 10:44











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          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',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          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%2fstackoverflow.com%2fquestions%2f53407321%2freplace-string-in-class-bash-and-azuredevops-ios-xamarin-pipeline%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          2














          Your script is correct and will get desired output, only remove the dual apostrophes after sed -i:



          sed -i 's#ApiUrl = "[a-z:./]*"#ApiUrl = "'$API_URL'"#' $APP_CONSTANT_FILE


          However I would also change regexp at least to this, since . (dot) is reserved as any character in regexp:



          sed -i 's#ApiUrl = "[a-z:./]*"#ApiUrl = "'$API_URL'"#' $APP_CONSTANT_FILE


          Or even to this (in order to take whatever characters between quotes):



          sed -i 's#ApiUrl = "[^"]*"#ApiUrl = "'$API_URL'"#' $APP_CONSTANT_FILE


          Test:



          $ cat > developer9969.txt
          namespace Core
          {
          public class AppConstant
          {
          public const string ApiUrl = "https://production.com/api";
          }
          }

          API_URL='https://kubator.com/'
          APP_CONSTANT_FILE='./developer9969.txt'
          sed -i 's#ApiUrl = "[^"]*"#ApiUrl = "'$API_URL'"#' $APP_CONSTANT_FILE

          $ cat $APP_CONSTANT_FILE
          namespace Core
          {
          public class AppConstant
          {
          public const string ApiUrl = "https://kubator.com/";
          }
          }





          share|improve this answer


























          • Hi thanks for your time I am not familiar at all with bash as I come from windows etc.. if I wanted to replace another constant string that is not a url would I need to sed -i 's#ApiUrl = "[a-z:./]*"#ApiUrl = "'$API_URL'"#' $APP_CONSTANT_FILE becomes sed -i 's#myconst = "[a-z:]"#myconst = "'$myconst'"#' $APP_CONSTANT_FILE basically removing "./]*

            – developer9969
            Nov 21 '18 at 8:52











          • This is more regular expression question. Basically means character class and * means repeat 0 or unlimited times. So that's why regular expression [a-z:./] kind matches Your url. I am saying kind because having full regexp for url is tough. At least in Your case I would repair [a-z:./]. Dot must be escaped because is alos regexp reserved as any single character. If You would like to match any non empty aplha (both upper, lower case) string I would suggest regexp: ^[A-Za-z]+$ where ^ is beginning, [A-Za-z] both upple lower alpha, + is repeat one or more times, $ is end

            – Kubator
            Nov 21 '18 at 9:46











          • thanks for your help on this one i guess your are right is more about regex which is another issue i have tried as follows to replace a const but cannot do it sed -i 's#AnotherOne = "^[A-Za-z]+$"#AnotherOne = "'$ANOTHERONE'"#' $APP_CONSTANT_FILE .

            – developer9969
            Nov 21 '18 at 10:13











          • That was generic example, in this case use simply: sed -i 's#AnotherOne = "[^"]*"#AnotherOne = "'$ANOTHERONE'"#' $APP_CONSTANT_FILE

            – Kubator
            Nov 21 '18 at 10:27













          • All working now than you!

            – developer9969
            Nov 21 '18 at 10:44
















          2














          Your script is correct and will get desired output, only remove the dual apostrophes after sed -i:



          sed -i 's#ApiUrl = "[a-z:./]*"#ApiUrl = "'$API_URL'"#' $APP_CONSTANT_FILE


          However I would also change regexp at least to this, since . (dot) is reserved as any character in regexp:



          sed -i 's#ApiUrl = "[a-z:./]*"#ApiUrl = "'$API_URL'"#' $APP_CONSTANT_FILE


          Or even to this (in order to take whatever characters between quotes):



          sed -i 's#ApiUrl = "[^"]*"#ApiUrl = "'$API_URL'"#' $APP_CONSTANT_FILE


          Test:



          $ cat > developer9969.txt
          namespace Core
          {
          public class AppConstant
          {
          public const string ApiUrl = "https://production.com/api";
          }
          }

          API_URL='https://kubator.com/'
          APP_CONSTANT_FILE='./developer9969.txt'
          sed -i 's#ApiUrl = "[^"]*"#ApiUrl = "'$API_URL'"#' $APP_CONSTANT_FILE

          $ cat $APP_CONSTANT_FILE
          namespace Core
          {
          public class AppConstant
          {
          public const string ApiUrl = "https://kubator.com/";
          }
          }





          share|improve this answer


























          • Hi thanks for your time I am not familiar at all with bash as I come from windows etc.. if I wanted to replace another constant string that is not a url would I need to sed -i 's#ApiUrl = "[a-z:./]*"#ApiUrl = "'$API_URL'"#' $APP_CONSTANT_FILE becomes sed -i 's#myconst = "[a-z:]"#myconst = "'$myconst'"#' $APP_CONSTANT_FILE basically removing "./]*

            – developer9969
            Nov 21 '18 at 8:52











          • This is more regular expression question. Basically means character class and * means repeat 0 or unlimited times. So that's why regular expression [a-z:./] kind matches Your url. I am saying kind because having full regexp for url is tough. At least in Your case I would repair [a-z:./]. Dot must be escaped because is alos regexp reserved as any single character. If You would like to match any non empty aplha (both upper, lower case) string I would suggest regexp: ^[A-Za-z]+$ where ^ is beginning, [A-Za-z] both upple lower alpha, + is repeat one or more times, $ is end

            – Kubator
            Nov 21 '18 at 9:46











          • thanks for your help on this one i guess your are right is more about regex which is another issue i have tried as follows to replace a const but cannot do it sed -i 's#AnotherOne = "^[A-Za-z]+$"#AnotherOne = "'$ANOTHERONE'"#' $APP_CONSTANT_FILE .

            – developer9969
            Nov 21 '18 at 10:13











          • That was generic example, in this case use simply: sed -i 's#AnotherOne = "[^"]*"#AnotherOne = "'$ANOTHERONE'"#' $APP_CONSTANT_FILE

            – Kubator
            Nov 21 '18 at 10:27













          • All working now than you!

            – developer9969
            Nov 21 '18 at 10:44














          2












          2








          2







          Your script is correct and will get desired output, only remove the dual apostrophes after sed -i:



          sed -i 's#ApiUrl = "[a-z:./]*"#ApiUrl = "'$API_URL'"#' $APP_CONSTANT_FILE


          However I would also change regexp at least to this, since . (dot) is reserved as any character in regexp:



          sed -i 's#ApiUrl = "[a-z:./]*"#ApiUrl = "'$API_URL'"#' $APP_CONSTANT_FILE


          Or even to this (in order to take whatever characters between quotes):



          sed -i 's#ApiUrl = "[^"]*"#ApiUrl = "'$API_URL'"#' $APP_CONSTANT_FILE


          Test:



          $ cat > developer9969.txt
          namespace Core
          {
          public class AppConstant
          {
          public const string ApiUrl = "https://production.com/api";
          }
          }

          API_URL='https://kubator.com/'
          APP_CONSTANT_FILE='./developer9969.txt'
          sed -i 's#ApiUrl = "[^"]*"#ApiUrl = "'$API_URL'"#' $APP_CONSTANT_FILE

          $ cat $APP_CONSTANT_FILE
          namespace Core
          {
          public class AppConstant
          {
          public const string ApiUrl = "https://kubator.com/";
          }
          }





          share|improve this answer















          Your script is correct and will get desired output, only remove the dual apostrophes after sed -i:



          sed -i 's#ApiUrl = "[a-z:./]*"#ApiUrl = "'$API_URL'"#' $APP_CONSTANT_FILE


          However I would also change regexp at least to this, since . (dot) is reserved as any character in regexp:



          sed -i 's#ApiUrl = "[a-z:./]*"#ApiUrl = "'$API_URL'"#' $APP_CONSTANT_FILE


          Or even to this (in order to take whatever characters between quotes):



          sed -i 's#ApiUrl = "[^"]*"#ApiUrl = "'$API_URL'"#' $APP_CONSTANT_FILE


          Test:



          $ cat > developer9969.txt
          namespace Core
          {
          public class AppConstant
          {
          public const string ApiUrl = "https://production.com/api";
          }
          }

          API_URL='https://kubator.com/'
          APP_CONSTANT_FILE='./developer9969.txt'
          sed -i 's#ApiUrl = "[^"]*"#ApiUrl = "'$API_URL'"#' $APP_CONSTANT_FILE

          $ cat $APP_CONSTANT_FILE
          namespace Core
          {
          public class AppConstant
          {
          public const string ApiUrl = "https://kubator.com/";
          }
          }






          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Nov 21 '18 at 9:56

























          answered Nov 21 '18 at 8:09









          KubatorKubator

          74911




          74911













          • Hi thanks for your time I am not familiar at all with bash as I come from windows etc.. if I wanted to replace another constant string that is not a url would I need to sed -i 's#ApiUrl = "[a-z:./]*"#ApiUrl = "'$API_URL'"#' $APP_CONSTANT_FILE becomes sed -i 's#myconst = "[a-z:]"#myconst = "'$myconst'"#' $APP_CONSTANT_FILE basically removing "./]*

            – developer9969
            Nov 21 '18 at 8:52











          • This is more regular expression question. Basically means character class and * means repeat 0 or unlimited times. So that's why regular expression [a-z:./] kind matches Your url. I am saying kind because having full regexp for url is tough. At least in Your case I would repair [a-z:./]. Dot must be escaped because is alos regexp reserved as any single character. If You would like to match any non empty aplha (both upper, lower case) string I would suggest regexp: ^[A-Za-z]+$ where ^ is beginning, [A-Za-z] both upple lower alpha, + is repeat one or more times, $ is end

            – Kubator
            Nov 21 '18 at 9:46











          • thanks for your help on this one i guess your are right is more about regex which is another issue i have tried as follows to replace a const but cannot do it sed -i 's#AnotherOne = "^[A-Za-z]+$"#AnotherOne = "'$ANOTHERONE'"#' $APP_CONSTANT_FILE .

            – developer9969
            Nov 21 '18 at 10:13











          • That was generic example, in this case use simply: sed -i 's#AnotherOne = "[^"]*"#AnotherOne = "'$ANOTHERONE'"#' $APP_CONSTANT_FILE

            – Kubator
            Nov 21 '18 at 10:27













          • All working now than you!

            – developer9969
            Nov 21 '18 at 10:44



















          • Hi thanks for your time I am not familiar at all with bash as I come from windows etc.. if I wanted to replace another constant string that is not a url would I need to sed -i 's#ApiUrl = "[a-z:./]*"#ApiUrl = "'$API_URL'"#' $APP_CONSTANT_FILE becomes sed -i 's#myconst = "[a-z:]"#myconst = "'$myconst'"#' $APP_CONSTANT_FILE basically removing "./]*

            – developer9969
            Nov 21 '18 at 8:52











          • This is more regular expression question. Basically means character class and * means repeat 0 or unlimited times. So that's why regular expression [a-z:./] kind matches Your url. I am saying kind because having full regexp for url is tough. At least in Your case I would repair [a-z:./]. Dot must be escaped because is alos regexp reserved as any single character. If You would like to match any non empty aplha (both upper, lower case) string I would suggest regexp: ^[A-Za-z]+$ where ^ is beginning, [A-Za-z] both upple lower alpha, + is repeat one or more times, $ is end

            – Kubator
            Nov 21 '18 at 9:46











          • thanks for your help on this one i guess your are right is more about regex which is another issue i have tried as follows to replace a const but cannot do it sed -i 's#AnotherOne = "^[A-Za-z]+$"#AnotherOne = "'$ANOTHERONE'"#' $APP_CONSTANT_FILE .

            – developer9969
            Nov 21 '18 at 10:13











          • That was generic example, in this case use simply: sed -i 's#AnotherOne = "[^"]*"#AnotherOne = "'$ANOTHERONE'"#' $APP_CONSTANT_FILE

            – Kubator
            Nov 21 '18 at 10:27













          • All working now than you!

            – developer9969
            Nov 21 '18 at 10:44

















          Hi thanks for your time I am not familiar at all with bash as I come from windows etc.. if I wanted to replace another constant string that is not a url would I need to sed -i 's#ApiUrl = "[a-z:./]*"#ApiUrl = "'$API_URL'"#' $APP_CONSTANT_FILE becomes sed -i 's#myconst = "[a-z:]"#myconst = "'$myconst'"#' $APP_CONSTANT_FILE basically removing "./]*

          – developer9969
          Nov 21 '18 at 8:52





          Hi thanks for your time I am not familiar at all with bash as I come from windows etc.. if I wanted to replace another constant string that is not a url would I need to sed -i 's#ApiUrl = "[a-z:./]*"#ApiUrl = "'$API_URL'"#' $APP_CONSTANT_FILE becomes sed -i 's#myconst = "[a-z:]"#myconst = "'$myconst'"#' $APP_CONSTANT_FILE basically removing "./]*

          – developer9969
          Nov 21 '18 at 8:52













          This is more regular expression question. Basically means character class and * means repeat 0 or unlimited times. So that's why regular expression [a-z:./] kind matches Your url. I am saying kind because having full regexp for url is tough. At least in Your case I would repair [a-z:./]. Dot must be escaped because is alos regexp reserved as any single character. If You would like to match any non empty aplha (both upper, lower case) string I would suggest regexp: ^[A-Za-z]+$ where ^ is beginning, [A-Za-z] both upple lower alpha, + is repeat one or more times, $ is end

          – Kubator
          Nov 21 '18 at 9:46





          This is more regular expression question. Basically means character class and * means repeat 0 or unlimited times. So that's why regular expression [a-z:./] kind matches Your url. I am saying kind because having full regexp for url is tough. At least in Your case I would repair [a-z:./]. Dot must be escaped because is alos regexp reserved as any single character. If You would like to match any non empty aplha (both upper, lower case) string I would suggest regexp: ^[A-Za-z]+$ where ^ is beginning, [A-Za-z] both upple lower alpha, + is repeat one or more times, $ is end

          – Kubator
          Nov 21 '18 at 9:46













          thanks for your help on this one i guess your are right is more about regex which is another issue i have tried as follows to replace a const but cannot do it sed -i 's#AnotherOne = "^[A-Za-z]+$"#AnotherOne = "'$ANOTHERONE'"#' $APP_CONSTANT_FILE .

          – developer9969
          Nov 21 '18 at 10:13





          thanks for your help on this one i guess your are right is more about regex which is another issue i have tried as follows to replace a const but cannot do it sed -i 's#AnotherOne = "^[A-Za-z]+$"#AnotherOne = "'$ANOTHERONE'"#' $APP_CONSTANT_FILE .

          – developer9969
          Nov 21 '18 at 10:13













          That was generic example, in this case use simply: sed -i 's#AnotherOne = "[^"]*"#AnotherOne = "'$ANOTHERONE'"#' $APP_CONSTANT_FILE

          – Kubator
          Nov 21 '18 at 10:27







          That was generic example, in this case use simply: sed -i 's#AnotherOne = "[^"]*"#AnotherOne = "'$ANOTHERONE'"#' $APP_CONSTANT_FILE

          – Kubator
          Nov 21 '18 at 10:27















          All working now than you!

          – developer9969
          Nov 21 '18 at 10:44





          All working now than you!

          – developer9969
          Nov 21 '18 at 10:44


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53407321%2freplace-string-in-class-bash-and-azuredevops-ios-xamarin-pipeline%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

          If I really need a card on my start hand, how many mulligans make sense? [duplicate]

          Alcedinidae

          Can an atomic nucleus contain both particles and antiparticles? [duplicate]