Sample Header Ad - 728x90

Is this segment fault raised when running `shuf`?

0 votes
0 answers
178 views
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 where no files named after the numbers exist, pipe them to shuf, and then pipe them to mycommand which is an ELF executable. Most of time the script runs fine, but sometimes it gets segment fault error, i.e. The segment fault error is not reproducible. $ myscript 0001 734 XMJ /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.
Asked by Tim (106440 rep)
Oct 29, 2018, 09:36 PM
Last activity: Oct 29, 2018, 10:36 PM