Shell way to get specific text based on condition

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











up vote
0
down vote

favorite












Using shell script I am making a db call on database VM and I am getting and storing the query response into a .txt file. Which looks like below:



X folder Check:
Number of Files on X Outbound
17
Y folder Check:
Number of Files on Y Outbound
17
Z folder Check:
Number of Files on Z Outbound
18


Now for each of the X,Y and Z. I am basically receiving files(counts) on their respective locations. So I am expecting to get "18" files for each X,Y and Z. Now using shell I want to be able to know/store the folders for which I didn't receive 18 files.



Example: here in the above case I should get that I am missing files for X and Y folders.



Any help ?? Thank you.









share

























    up vote
    0
    down vote

    favorite












    Using shell script I am making a db call on database VM and I am getting and storing the query response into a .txt file. Which looks like below:



    X folder Check:
    Number of Files on X Outbound
    17
    Y folder Check:
    Number of Files on Y Outbound
    17
    Z folder Check:
    Number of Files on Z Outbound
    18


    Now for each of the X,Y and Z. I am basically receiving files(counts) on their respective locations. So I am expecting to get "18" files for each X,Y and Z. Now using shell I want to be able to know/store the folders for which I didn't receive 18 files.



    Example: here in the above case I should get that I am missing files for X and Y folders.



    Any help ?? Thank you.









    share























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      Using shell script I am making a db call on database VM and I am getting and storing the query response into a .txt file. Which looks like below:



      X folder Check:
      Number of Files on X Outbound
      17
      Y folder Check:
      Number of Files on Y Outbound
      17
      Z folder Check:
      Number of Files on Z Outbound
      18


      Now for each of the X,Y and Z. I am basically receiving files(counts) on their respective locations. So I am expecting to get "18" files for each X,Y and Z. Now using shell I want to be able to know/store the folders for which I didn't receive 18 files.



      Example: here in the above case I should get that I am missing files for X and Y folders.



      Any help ?? Thank you.









      share













      Using shell script I am making a db call on database VM and I am getting and storing the query response into a .txt file. Which looks like below:



      X folder Check:
      Number of Files on X Outbound
      17
      Y folder Check:
      Number of Files on Y Outbound
      17
      Z folder Check:
      Number of Files on Z Outbound
      18


      Now for each of the X,Y and Z. I am basically receiving files(counts) on their respective locations. So I am expecting to get "18" files for each X,Y and Z. Now using shell I want to be able to know/store the folders for which I didn't receive 18 files.



      Example: here in the above case I should get that I am missing files for X and Y folders.



      Any help ?? Thank you.







      shell-script cron text





      share












      share










      share



      share










      asked 3 mins ago









      harveySp

      11




      11

























          active

          oldest

          votes











          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: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          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%2f478592%2fshell-way-to-get-specific-text-based-on-condition%23new-answer', 'question_page');

          );

          Post as a guest



































          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f478592%2fshell-way-to-get-specific-text-based-on-condition%23new-answer', 'question_page');

          );

          Post as a guest













































































          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