In Linux, using Bash, I have two scripts:

1. `script.sh` is the main script, and 
2. `script_config.sh` is the configuration for `script.sh`.

In `script.sh`, I do `source script_config.sh` to load all the config from there.

In `script_config.sh`, I do things like:

```bash
TEMPDIR=/mnt/sda1/temp
```

I don’t know if this is the best way, but for me it’s okay, I have the config in a separate file and can load it into the main script.

In an old version of `script.sh`, I used `shuf` to read a file (`cipher_to_use.txt`) to get random input for which cipher to use with `cryptsetup`.

In `cipher_to_use.txt`, there are only 6 different ciphers listed, but some lines appear up to 10 times, so `shuf` chooses them more often but still randomly. That works okay for me.

But now, with `script_config.sh`, I’m looking for a way to continue this approach, 
**but I don’t want to write the 6 ciphers more than once in `script_config.sh`.**

How can I use different ciphers with `shuf`, but make some appear more often than others, while listing each cipher only once in `script_config.sh`?





:edit


thanks nbanana for your ideas, but is there a way to make it a little bit different from your way?

if i write in `script_config.sh` this:

(chk = cipher has key)

 chk1_name_="--cipher aes-cbc-essiv:sha256 --hash sha512 --key-size 256"
 chk1_weigt="15"
 
 chk2_name_="--cipher serpent-cbc-essiv:sha256 --hash sha512 --key-size 256"
 chk2_weigt="1"
 
 chk3_name_="--cipher twofish-cbc-essiv:sha256 --hash sha512 --key-size 256"
 chk3_weigt="1"
 
 chk4_name_="--cipher aes-xts-plain64 --hash sha512 --key-size 512"
 chk4_weigt="4"
 
 chk5_name_="--cipher serpent-xts-plain64 --hash sha512 --key-size 512"
 chk5_weigt="1"
 
 chk6_name_="--cipher twofish-xts-plain64 --hash sha512 --key-size 512"
 chk6_weigt="1"

what have i to add in `script.sh` to become a `ciphers_has_key_list`-file

whit 15times in chk1, 1 chk2, and so on...
?

what if, if chk6 does not exist anymore?

what if, if there a chk7 and a chk8 ?