mirror of
https://gitlab.com/shorewall/code.git
synced 2024-12-24 07:08:53 +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
@ -2481,8 +2481,8 @@ 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