script appears to run with no progress
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
This script is to find a list of files stored in a text file, and if the files are found, copy them to a specific location. So far I have had success running the portions up to but not including the portion that actually copies the files. When I add the code to copy the file, starting with exec, the script no longer appears to work and makes no progress. I would like to understand what is locking this script up and how to make it work correctly. Thanks!
#!/bin/bash
#Find files from a list in a file and copy them to a common folder
mapfile -t filelist < filelist.txt
for file in "$filelist[@]"; do
xargs find ~ -name '$filelist[@]' -exec mv -t ~/Document/foundfiles/ +;
done
shell-script mv exec
add a comment |Â
up vote
0
down vote
favorite
This script is to find a list of files stored in a text file, and if the files are found, copy them to a specific location. So far I have had success running the portions up to but not including the portion that actually copies the files. When I add the code to copy the file, starting with exec, the script no longer appears to work and makes no progress. I would like to understand what is locking this script up and how to make it work correctly. Thanks!
#!/bin/bash
#Find files from a list in a file and copy them to a common folder
mapfile -t filelist < filelist.txt
for file in "$filelist[@]"; do
xargs find ~ -name '$filelist[@]' -exec mv -t ~/Document/foundfiles/ +;
done
shell-script mv exec
1
xargs
(which is superfluous, as far as I can see) is waiting for standard input
â steeldriver
May 8 at 0:50
I'll get rid of that, that was from an old iteration. That was apparently masking another problem, thanks.
â user289380
May 8 at 1:05
... also presumably it should be-name "$file"
â steeldriver
May 8 at 1:08
Yes, that has made more progress, thank you!
â user289380
May 8 at 1:12
You solved it! thanks!
â user289380
May 8 at 1:16
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
This script is to find a list of files stored in a text file, and if the files are found, copy them to a specific location. So far I have had success running the portions up to but not including the portion that actually copies the files. When I add the code to copy the file, starting with exec, the script no longer appears to work and makes no progress. I would like to understand what is locking this script up and how to make it work correctly. Thanks!
#!/bin/bash
#Find files from a list in a file and copy them to a common folder
mapfile -t filelist < filelist.txt
for file in "$filelist[@]"; do
xargs find ~ -name '$filelist[@]' -exec mv -t ~/Document/foundfiles/ +;
done
shell-script mv exec
This script is to find a list of files stored in a text file, and if the files are found, copy them to a specific location. So far I have had success running the portions up to but not including the portion that actually copies the files. When I add the code to copy the file, starting with exec, the script no longer appears to work and makes no progress. I would like to understand what is locking this script up and how to make it work correctly. Thanks!
#!/bin/bash
#Find files from a list in a file and copy them to a common folder
mapfile -t filelist < filelist.txt
for file in "$filelist[@]"; do
xargs find ~ -name '$filelist[@]' -exec mv -t ~/Document/foundfiles/ +;
done
shell-script mv exec
asked May 8 at 0:43
user289380
1
xargs
(which is superfluous, as far as I can see) is waiting for standard input
â steeldriver
May 8 at 0:50
I'll get rid of that, that was from an old iteration. That was apparently masking another problem, thanks.
â user289380
May 8 at 1:05
... also presumably it should be-name "$file"
â steeldriver
May 8 at 1:08
Yes, that has made more progress, thank you!
â user289380
May 8 at 1:12
You solved it! thanks!
â user289380
May 8 at 1:16
add a comment |Â
1
xargs
(which is superfluous, as far as I can see) is waiting for standard input
â steeldriver
May 8 at 0:50
I'll get rid of that, that was from an old iteration. That was apparently masking another problem, thanks.
â user289380
May 8 at 1:05
... also presumably it should be-name "$file"
â steeldriver
May 8 at 1:08
Yes, that has made more progress, thank you!
â user289380
May 8 at 1:12
You solved it! thanks!
â user289380
May 8 at 1:16
1
1
xargs
(which is superfluous, as far as I can see) is waiting for standard inputâ steeldriver
May 8 at 0:50
xargs
(which is superfluous, as far as I can see) is waiting for standard inputâ steeldriver
May 8 at 0:50
I'll get rid of that, that was from an old iteration. That was apparently masking another problem, thanks.
â user289380
May 8 at 1:05
I'll get rid of that, that was from an old iteration. That was apparently masking another problem, thanks.
â user289380
May 8 at 1:05
... also presumably it should be
-name "$file"
â steeldriver
May 8 at 1:08
... also presumably it should be
-name "$file"
â steeldriver
May 8 at 1:08
Yes, that has made more progress, thank you!
â user289380
May 8 at 1:12
Yes, that has made more progress, thank you!
â user289380
May 8 at 1:12
You solved it! thanks!
â user289380
May 8 at 1:16
You solved it! thanks!
â user289380
May 8 at 1:16
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
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
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f442432%2fscript-appears-to-run-with-no-progress%23new-answer', 'question_page');
);
Post as a guest
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
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
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
1
xargs
(which is superfluous, as far as I can see) is waiting for standard inputâ steeldriver
May 8 at 0:50
I'll get rid of that, that was from an old iteration. That was apparently masking another problem, thanks.
â user289380
May 8 at 1:05
... also presumably it should be
-name "$file"
â steeldriver
May 8 at 1:08
Yes, that has made more progress, thank you!
â user289380
May 8 at 1:12
You solved it! thanks!
â user289380
May 8 at 1:16