0

I am having a problem with feeding values like _PREROUTING _POSTROUTING to strip out alphabet chars :

a=${step/\_+([a-zA-Z]/\_}
[ note: replacing underscore with \x5f does nothing for the script although using sed works via 's/_[a-zA-Z][a-zA-Z]*/_/gp' but that is NOT what i __wanted__]   

(GNU)[https://www.gnu.org/software/bash/manual/html_node/Shell-Parameter-Expansion.html] seems to agree with me, my bash does(5.1) not have shop +patsub_replacement available for 5.2.

linux mint version and bash version see step variable and [original script in]
(Bash has problems with cmdline nft cmd vs script)

I tried [:alpha:] but neither works in script and rarely at the command line.

ArrowInTree
  • 164
  • 7

0 Answers0