#!/bin/bash # Populate the features variable features=$(awk '/^\[features\]/ {flag=1; next} /^\[/ {flag=0} flag {print}' Cargo.toml | \ sed 's/^[ \t]*//;s/[ \t]*$//' | \ grep -v '^\s*#' | \ grep -v '^\s*$' | \ cut -d'=' -f1 | \ grep -vE "(default|color)") # Convert the multiline string to an array IFS=$'\n' read -r -d '' -a feature_array <<< "$features" generate_powerset() { local items=("$@") local len=${#items[@]} local total=$((1 << len)) for ((i=0; i