Merge pull request #174 into master

36c0c93 container: lib_taxes: reorder obfs columns (Aaron Fiore)
This commit was merged in pull request #174.
This commit is contained in:
2025-01-10 19:37:01 -08:00

View File

@@ -1298,19 +1298,19 @@ function lib_taxes::__reports_obfs_gen()
local _keymap_file
_keymap_file="$(dirname ${_out_file})/${_tax_year}_${_arg_tag}-keymap_${_styled_column}.csv"
echo "ObfsKey,RawValue" \
echo "RawValue,ObfsKey" \
| gawk -v tax_year="$_tax_year" -v args_tag="$_arg_tag" \
-v column="$_styled_column" -v count="$_count" \
-v obfs="${_obfs[*]}" -v raw="${_raw[*]}" \
'{
printf $1 OFS $2 "\n" # Header
split(obfs, o, ",")
split(raw, r, ",")
split(obfs, o, ",")
for(i = 1; i <= count; i++)
{
print o[i] OFS r[i]
print r[i] OFS o[i]
}
}' FS=, OFS=, \
| (
@@ -1326,7 +1326,7 @@ function lib_taxes::__reports_obfs_gen()
# Obfuscate given raw column with keymap data
tail -n +2 "$_keymap_file" \
| while read _line; do
sed -i "s|${_line#*,}|${_line%,*}|g" "$_tmp_file"
sed -i "s|${_line%,*}|${_line#*,}|g" "$_tmp_file"
done
done