Is this segment fault raised when running `shuf`?

Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I have a script, where there is a line:
eval for i in "$1".."$2"; do [ ! -e "$3"/$i.* ] && echo "$i" ; done | shuf | mycommand "$3"
which means: first create a sequence of numbers, pipe them to shuf, and then pipe them to mycommand.
Most of time the script runs fine, but sometimes it gets segment fault error
/home/tim/bin/myscript: line 25: 10170 Exit 1 for i in 0001..734;
do
[ ! -e XMJ/$i.* ] && echo "$i";
done
10171 Done | shuf
10172 Segmentation fault (core dumped) | mycommand XMJ
Does that mean that the segment fault is raised when running shuf?
What can we deduce from the error message and possibly correct it?
Thanks.
bash scripting shuf
add a comment |Â
up vote
0
down vote
favorite
I have a script, where there is a line:
eval for i in "$1".."$2"; do [ ! -e "$3"/$i.* ] && echo "$i" ; done | shuf | mycommand "$3"
which means: first create a sequence of numbers, pipe them to shuf, and then pipe them to mycommand.
Most of time the script runs fine, but sometimes it gets segment fault error
/home/tim/bin/myscript: line 25: 10170 Exit 1 for i in 0001..734;
do
[ ! -e XMJ/$i.* ] && echo "$i";
done
10171 Done | shuf
10172 Segmentation fault (core dumped) | mycommand XMJ
Does that mean that the segment fault is raised when running shuf?
What can we deduce from the error message and possibly correct it?
Thanks.
bash scripting shuf
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have a script, where there is a line:
eval for i in "$1".."$2"; do [ ! -e "$3"/$i.* ] && echo "$i" ; done | shuf | mycommand "$3"
which means: first create a sequence of numbers, pipe them to shuf, and then pipe them to mycommand.
Most of time the script runs fine, but sometimes it gets segment fault error
/home/tim/bin/myscript: line 25: 10170 Exit 1 for i in 0001..734;
do
[ ! -e XMJ/$i.* ] && echo "$i";
done
10171 Done | shuf
10172 Segmentation fault (core dumped) | mycommand XMJ
Does that mean that the segment fault is raised when running shuf?
What can we deduce from the error message and possibly correct it?
Thanks.
bash scripting shuf
I have a script, where there is a line:
eval for i in "$1".."$2"; do [ ! -e "$3"/$i.* ] && echo "$i" ; done | shuf | mycommand "$3"
which means: first create a sequence of numbers, pipe them to shuf, and then pipe them to mycommand.
Most of time the script runs fine, but sometimes it gets segment fault error
/home/tim/bin/myscript: line 25: 10170 Exit 1 for i in 0001..734;
do
[ ! -e XMJ/$i.* ] && echo "$i";
done
10171 Done | shuf
10172 Segmentation fault (core dumped) | mycommand XMJ
Does that mean that the segment fault is raised when running shuf?
What can we deduce from the error message and possibly correct it?
Thanks.
bash scripting shuf
bash scripting shuf
asked 3 mins ago
Tim
24.3k69238426
24.3k69238426
add a comment |Â
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%2f478535%2fis-this-segment-fault-raised-when-running-shuf%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