What is wrong in this shell script?What does the syntax on this shell command with extglob mean?What is wrong...
Can I use both 気温 and 温度 when asking for the weather temperature?
My professor says my digit summing code is flawed. Is he right?
What's the most efficient way to draw this region?
Does the Wall of Stone spell need support or not?
5v home network
Why is CMYK & PNG not possible?
Is data science mathematically interesting?
Can every language be categorized as either compiled or interpreted?
Fantasy novel/series with young man who discovers he can use magic that is outlawed
Novel set in the future, children cannot change the class they are born into, one class is made uneducated by associating books with pain
Why is it so hard to land on the Moon?
Would removing the "total cover" part of a Paladin's Divine Sense unbalance the feature?
Is it possible to do a low carb diet for a month in Sicily?
Are there any rules around when something can be described as "based on a true story"?
Is there a practical way of making democratic-like system skewed towards competence?
How do I weigh a kitchen island to determine what size castors to get?
Is consistent disregard for students' time "normal" in undergraduate research?
How to respond when insulted by a grad student in a different department?
'Kukhtarev's model' or 'THE Kukhtarev's model'?
Can you take Bowwow out after returning him to MeowMeow?
Can you decide not to sneak into a room after seeing your roll?
I'm not alive, but I can be lively
How to execute a project with two resources where you need three resources?
How can I attach a set of five panniers?
What is wrong in this shell script?
What does the syntax on this shell command with extglob mean?What is wrong with this call to sed -i?How to script this task?AIX shell script compileruntar shell scriptScript to compare and delete the files based on name and extension type
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{
margin-bottom:0;
}
It can not generate two temp-files!
Why not? Please help!!
The input-file has two columns for the file names.
But it fails to copy the files "fn1", "fn2" into "Data1.dat", "Data2.dat"
What is wrong here??
#!/bin/bash
FF1=$1
while IFS=" " read -r line1 line2;
do
fn1="$line1"
fn2="$line2"
cp $fn1 Data1.dat;
cp $fn2 Data2.dat;
...other ext-scripts!...
done > $FF1
This code failed to copy so as to generate those two temporary data-files!
There are "error-messages for cp-operation lines"
Please help to make the two files correctly.
Thx.
shell scripting template
New contributor
add a comment
|
It can not generate two temp-files!
Why not? Please help!!
The input-file has two columns for the file names.
But it fails to copy the files "fn1", "fn2" into "Data1.dat", "Data2.dat"
What is wrong here??
#!/bin/bash
FF1=$1
while IFS=" " read -r line1 line2;
do
fn1="$line1"
fn2="$line2"
cp $fn1 Data1.dat;
cp $fn2 Data2.dat;
...other ext-scripts!...
done > $FF1
This code failed to copy so as to generate those two temporary data-files!
There are "error-messages for cp-operation lines"
Please help to make the two files correctly.
Thx.
shell scripting template
New contributor
done > $FF1
-- you are writing to that file, not reading from.
– glenn jackman
32 mins ago
Could you be more specific?? I'm a real-beginner of this kind of script, starting today. The problem is that this code can not copy those "Data1.dat", "Data2.dat" files...!! P.S) I'm doing an iterative works using this code to run ext-script by reading line by line from another file~!
– David
15 mins ago
add a comment
|
It can not generate two temp-files!
Why not? Please help!!
The input-file has two columns for the file names.
But it fails to copy the files "fn1", "fn2" into "Data1.dat", "Data2.dat"
What is wrong here??
#!/bin/bash
FF1=$1
while IFS=" " read -r line1 line2;
do
fn1="$line1"
fn2="$line2"
cp $fn1 Data1.dat;
cp $fn2 Data2.dat;
...other ext-scripts!...
done > $FF1
This code failed to copy so as to generate those two temporary data-files!
There are "error-messages for cp-operation lines"
Please help to make the two files correctly.
Thx.
shell scripting template
New contributor
It can not generate two temp-files!
Why not? Please help!!
The input-file has two columns for the file names.
But it fails to copy the files "fn1", "fn2" into "Data1.dat", "Data2.dat"
What is wrong here??
#!/bin/bash
FF1=$1
while IFS=" " read -r line1 line2;
do
fn1="$line1"
fn2="$line2"
cp $fn1 Data1.dat;
cp $fn2 Data2.dat;
...other ext-scripts!...
done > $FF1
This code failed to copy so as to generate those two temporary data-files!
There are "error-messages for cp-operation lines"
Please help to make the two files correctly.
Thx.
shell scripting template
shell scripting template
New contributor
New contributor
edited 3 mins ago
David
New contributor
asked 41 mins ago
DavidDavid
11 bronze badge
11 bronze badge
New contributor
New contributor
done > $FF1
-- you are writing to that file, not reading from.
– glenn jackman
32 mins ago
Could you be more specific?? I'm a real-beginner of this kind of script, starting today. The problem is that this code can not copy those "Data1.dat", "Data2.dat" files...!! P.S) I'm doing an iterative works using this code to run ext-script by reading line by line from another file~!
– David
15 mins ago
add a comment
|
done > $FF1
-- you are writing to that file, not reading from.
– glenn jackman
32 mins ago
Could you be more specific?? I'm a real-beginner of this kind of script, starting today. The problem is that this code can not copy those "Data1.dat", "Data2.dat" files...!! P.S) I'm doing an iterative works using this code to run ext-script by reading line by line from another file~!
– David
15 mins ago
done > $FF1
-- you are writing to that file, not reading from.– glenn jackman
32 mins ago
done > $FF1
-- you are writing to that file, not reading from.– glenn jackman
32 mins ago
Could you be more specific?? I'm a real-beginner of this kind of script, starting today. The problem is that this code can not copy those "Data1.dat", "Data2.dat" files...!! P.S) I'm doing an iterative works using this code to run ext-script by reading line by line from another file~!
– David
15 mins ago
Could you be more specific?? I'm a real-beginner of this kind of script, starting today. The problem is that this code can not copy those "Data1.dat", "Data2.dat" files...!! P.S) I'm doing an iterative works using this code to run ext-script by reading line by line from another file~!
– David
15 mins ago
add a comment
|
0
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',
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/4.0/"u003ecc by-sa 4.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
});
}
});
David 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%2f545208%2fwhat-is-wrong-in-this-shell-script%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
David is a new contributor. Be nice, and check out our Code of Conduct.
David is a new contributor. Be nice, and check out our Code of Conduct.
David is a new contributor. Be nice, and check out our Code of Conduct.
David 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%2f545208%2fwhat-is-wrong-in-this-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
done > $FF1
-- you are writing to that file, not reading from.– glenn jackman
32 mins ago
Could you be more specific?? I'm a real-beginner of this kind of script, starting today. The problem is that this code can not copy those "Data1.dat", "Data2.dat" files...!! P.S) I'm doing an iterative works using this code to run ext-script by reading line by line from another file~!
– David
15 mins ago