Search This Blog

Monday, March 16, 2020

prt-get/pkgmk adjustments

If I'm ever going to lose my current Crux config. I need to remember, to adjust following files for Crux:
  • /etc/prt-get.conf to ensure that scripts as executed:

    runscripts yes            # (no|yes)


  • /etc/pkgmk.conf to ensure that md5sums are ignored:

    PKGMK_IGNORE_MD5SUM="yes"

Thursday, March 12, 2020

Bash and Arrays

Short reminder for my 'extended memory' on how to deal with lists in bash.

To define:
  • a list (an array): declare -a list
  • a dictionary (an associative array): declare -A dict
To use an array in loop: for item in ${list[@]}

Now the best, at least for scripts testing:
To print a whole array: declare -p list (please note, no "$" before list name).


Found at https://www.tutorialkart.com/bash-shell-scripting/bash-array/