I want a file of randomly generated positive or negative serial integers. For now, I ask the file contain roughly (no guarantee required) equal numbers of negative and positive, but make it easy to change the proporotions later. By "serial", I mean the kth random negative is equal to -k, and the kth random positive is equal to +k.
This GNU Bash script one-liner would satisfy the file format, but just wouldn't be random.
$ seq -1 -1 -5 && seq 1 5
-1
-2
-3
-4
-5
1
2
3
4
5
This example shows what I'm looking for even better, but is still not random.
$ paste <(seq -1 -1 -5) <(seq 1 5) | tr '\t' '\n'
-1
1
-2
2
-3
3
-4
4
-5
5
Sending one of these through the shuf command makes them lose their serial-ness.
$ paste <(seq -1 -1 -5) <(seq 1 5) | tr '\t' '\n' | shuf-5
4
3
2
-2
1
-1
-4
5
-3
Note that I'm trying to test algorithms that sort lists/arrays of bits (zeros and ones), but if I use 0s and 1s I won't be able to analyse the sort's behaviour or tell if stability was preserved.