Extract values from file using shell scriptShell script to merge properties file (sed/awk/comm/diff) for rpm...

Self-Preservation: How to DM NPCs that Love Living?

Thousands and thousands of words

What is the intuition behind uniform continuity?

Is this light switch installation safe and legal?

How to prevent bad sectors?

Asking bank to reduce APR instead of increasing credit limit

How can I prevent interns from being expendable?

If a problem only occurs randomly once in every N times on average, how many tests do I have to perform to be certain that it's now fixed?

What are the benefits of cryosleep?

How to detach yourself from a character you're going to kill?

Beginner's snake game using PyGame

If I create magical darkness with the Silent Image spell, can I see through it if I have the Devil's Sight warlock invocation?

How should I push back against my job assigning "homework"?

Expenditure in Poland - Forex doesn't have Zloty

If Sweden was to magically float away, at what altitude would it be visible from the southern hemisphere?

Team member doesn't give me the minimum time to complete a talk

Fastest way to perform complex search on pandas dataframe

Is floating in space similar to falling under gravity?

Can a non-EU citizen travel within the Schengen area without identity documents?

Could IPv6 make NAT / port numbers redundant?

The qvolume of an integer

How crucial is a waifu game storyline?

My player wants to cast multiple charges of magic missile from a wand

How to capture more stars?



Extract values from file using shell script


Shell script to merge properties file (sed/awk/comm/diff) for rpm upgradeIn a bash shell script, writing a for loop that iterates over string valuesshell script to do some text manipulation of text file data structure and slight content changesHow to decode base64 text in xml file in Linux?How to grep the following lines from a file?Executing shell script from command lineBuild a sitemap from local PHP forum pagesGet per-core CPU load in shell scriptOutput every N column from inputBrowse directory and extract word from folder name






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







0















In this file structure i want to extract the K-EFFECTIVE value and export it to an output file. How could I do it using shell script?.
Thanks in advance.



                    ...
0 OUTER ITERATIONS COMPLETED AT ITERATION 25, ITERATIONS HAVE CONVERGED
0 K-EFFECTIVE = 1.08760108893
0 BREAKDOWN OF CPU TIME:
*********************
COUPLING COEFFICIENTS = 15.80
SOLUTION INITIALIZATION = 0.46
OUTER ITERATIONS = 263.21
CREATE EDIT FILES = 0.31
...









share|improve this question







New contributor



Yro is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.


























    0















    In this file structure i want to extract the K-EFFECTIVE value and export it to an output file. How could I do it using shell script?.
    Thanks in advance.



                        ...
    0 OUTER ITERATIONS COMPLETED AT ITERATION 25, ITERATIONS HAVE CONVERGED
    0 K-EFFECTIVE = 1.08760108893
    0 BREAKDOWN OF CPU TIME:
    *********************
    COUPLING COEFFICIENTS = 15.80
    SOLUTION INITIALIZATION = 0.46
    OUTER ITERATIONS = 263.21
    CREATE EDIT FILES = 0.31
    ...









    share|improve this question







    New contributor



    Yro is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.






















      0












      0








      0








      In this file structure i want to extract the K-EFFECTIVE value and export it to an output file. How could I do it using shell script?.
      Thanks in advance.



                          ...
      0 OUTER ITERATIONS COMPLETED AT ITERATION 25, ITERATIONS HAVE CONVERGED
      0 K-EFFECTIVE = 1.08760108893
      0 BREAKDOWN OF CPU TIME:
      *********************
      COUPLING COEFFICIENTS = 15.80
      SOLUTION INITIALIZATION = 0.46
      OUTER ITERATIONS = 263.21
      CREATE EDIT FILES = 0.31
      ...









      share|improve this question







      New contributor



      Yro is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      In this file structure i want to extract the K-EFFECTIVE value and export it to an output file. How could I do it using shell script?.
      Thanks in advance.



                          ...
      0 OUTER ITERATIONS COMPLETED AT ITERATION 25, ITERATIONS HAVE CONVERGED
      0 K-EFFECTIVE = 1.08760108893
      0 BREAKDOWN OF CPU TIME:
      *********************
      COUPLING COEFFICIENTS = 15.80
      SOLUTION INITIALIZATION = 0.46
      OUTER ITERATIONS = 263.21
      CREATE EDIT FILES = 0.31
      ...






      shell-script ubuntu






      share|improve this question







      New contributor



      Yro is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.










      share|improve this question







      New contributor



      Yro is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.








      share|improve this question




      share|improve this question






      New contributor



      Yro is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.








      asked 2 hours ago









      YroYro

      31




      31




      New contributor



      Yro is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.




      New contributor




      Yro is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.
























          1 Answer
          1






          active

          oldest

          votes


















          0














          Using GNU grep in PCRE mode:



          grep -oP 'K-EFFECTIVEs*=s*K.*' file > output





          share|improve this answer
























          • thanks for your replay, another question, I have several K-effective values, how do I export them all in the same output file in a column? Thanks for your help.

            – Yro
            15 mins ago











          • @Yro the -o option should result in one line of output for each matched value i.e. a column of values in the output file

            – steeldriver
            11 mins ago











          • Thanks!, it has been very helpful.

            – Yro
            5 mins ago












          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',
          autoActivateHeartbeat: false,
          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
          });


          }
          });






          Yro is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f521637%2fextract-values-from-file-using-shell-script%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









          0














          Using GNU grep in PCRE mode:



          grep -oP 'K-EFFECTIVEs*=s*K.*' file > output





          share|improve this answer
























          • thanks for your replay, another question, I have several K-effective values, how do I export them all in the same output file in a column? Thanks for your help.

            – Yro
            15 mins ago











          • @Yro the -o option should result in one line of output for each matched value i.e. a column of values in the output file

            – steeldriver
            11 mins ago











          • Thanks!, it has been very helpful.

            – Yro
            5 mins ago
















          0














          Using GNU grep in PCRE mode:



          grep -oP 'K-EFFECTIVEs*=s*K.*' file > output





          share|improve this answer
























          • thanks for your replay, another question, I have several K-effective values, how do I export them all in the same output file in a column? Thanks for your help.

            – Yro
            15 mins ago











          • @Yro the -o option should result in one line of output for each matched value i.e. a column of values in the output file

            – steeldriver
            11 mins ago











          • Thanks!, it has been very helpful.

            – Yro
            5 mins ago














          0












          0








          0







          Using GNU grep in PCRE mode:



          grep -oP 'K-EFFECTIVEs*=s*K.*' file > output





          share|improve this answer













          Using GNU grep in PCRE mode:



          grep -oP 'K-EFFECTIVEs*=s*K.*' file > output






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 1 hour ago









          steeldriversteeldriver

          39.4k45492




          39.4k45492













          • thanks for your replay, another question, I have several K-effective values, how do I export them all in the same output file in a column? Thanks for your help.

            – Yro
            15 mins ago











          • @Yro the -o option should result in one line of output for each matched value i.e. a column of values in the output file

            – steeldriver
            11 mins ago











          • Thanks!, it has been very helpful.

            – Yro
            5 mins ago



















          • thanks for your replay, another question, I have several K-effective values, how do I export them all in the same output file in a column? Thanks for your help.

            – Yro
            15 mins ago











          • @Yro the -o option should result in one line of output for each matched value i.e. a column of values in the output file

            – steeldriver
            11 mins ago











          • Thanks!, it has been very helpful.

            – Yro
            5 mins ago

















          thanks for your replay, another question, I have several K-effective values, how do I export them all in the same output file in a column? Thanks for your help.

          – Yro
          15 mins ago





          thanks for your replay, another question, I have several K-effective values, how do I export them all in the same output file in a column? Thanks for your help.

          – Yro
          15 mins ago













          @Yro the -o option should result in one line of output for each matched value i.e. a column of values in the output file

          – steeldriver
          11 mins ago





          @Yro the -o option should result in one line of output for each matched value i.e. a column of values in the output file

          – steeldriver
          11 mins ago













          Thanks!, it has been very helpful.

          – Yro
          5 mins ago





          Thanks!, it has been very helpful.

          – Yro
          5 mins ago










          Yro is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          Yro is a new contributor. Be nice, and check out our Code of Conduct.













          Yro is a new contributor. Be nice, and check out our Code of Conduct.












          Yro is a new contributor. Be nice, and check out our Code of Conduct.
















          Thanks for contributing an answer to Unix & Linux Stack Exchange!


          • 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%2funix.stackexchange.com%2fquestions%2f521637%2fextract-values-from-file-using-shell-script%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

          Taj Mahal Inhaltsverzeichnis Aufbau | Geschichte | 350-Jahr-Feier | Heutige Bedeutung | Siehe auch |...

          Baia Sprie Cuprins Etimologie | Istorie | Demografie | Politică și administrație | Arii naturale...

          Nicolae Petrescu-Găină Cuprins Biografie | Opera | In memoriam | Varia | Controverse, incertitudini...