mirror of
https://gitlab.com/shorewall/code.git
synced 2024-12-20 05:11:03 +01:00
Only look for numerics if a shell variable begins with a number.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
6c1a5b8051
commit
8ebbdee20f
@ -2482,7 +2482,7 @@ sub set_action_param( $$ ) {
|
|||||||
sub expand_variables( \$ ) {
|
sub expand_variables( \$ ) {
|
||||||
my ( $lineref, $count ) = ( $_[0], 0 );
|
my ( $lineref, $count ) = ( $_[0], 0 );
|
||||||
# $1 $2 $3 - $4
|
# $1 $2 $3 - $4
|
||||||
while ( $$lineref =~ m( ^(.*?) \$({)? (\w+) (?(2)}) (.*)$ )x ) {
|
while ( $$lineref =~ m( ^(.*?) \$({)? (\d+|[a-zA-Z]\w*) (?(2)}) (.*)$ )x ) {
|
||||||
|
|
||||||
my ( $first, $var, $rest ) = ( $1, $3, $4);
|
my ( $first, $var, $rest ) = ( $1, $3, $4);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user