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;
}
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
New contributor
add a comment |
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
New contributor
add a comment |
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
New contributor
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
shell-script ubuntu
New contributor
New contributor
New contributor
asked 2 hours ago
YroYro
31
31
New contributor
New contributor
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
Using GNU grep
in PCRE mode:
grep -oP 'K-EFFECTIVEs*=s*K.*' file > output
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 theoutput
file
– steeldriver
11 mins ago
Thanks!, it has been very helpful.
– Yro
5 mins ago
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Using GNU grep
in PCRE mode:
grep -oP 'K-EFFECTIVEs*=s*K.*' file > output
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 theoutput
file
– steeldriver
11 mins ago
Thanks!, it has been very helpful.
– Yro
5 mins ago
add a comment |
Using GNU grep
in PCRE mode:
grep -oP 'K-EFFECTIVEs*=s*K.*' file > output
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 theoutput
file
– steeldriver
11 mins ago
Thanks!, it has been very helpful.
– Yro
5 mins ago
add a comment |
Using GNU grep
in PCRE mode:
grep -oP 'K-EFFECTIVEs*=s*K.*' file > output
Using GNU grep
in PCRE mode:
grep -oP 'K-EFFECTIVEs*=s*K.*' file > output
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 theoutput
file
– steeldriver
11 mins ago
Thanks!, it has been very helpful.
– Yro
5 mins ago
add a comment |
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 theoutput
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
add a comment |
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.
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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