=~ operator
A feature new since bash 3 is the =~ operator, which acts much like its perl equivalent
This means that you can identify file names
that match the pattern *.deb by checking for [[ $pkgname =~ .*\.deb ]]. Note that the doublebracket
syntax [[ ... ]] is required.
This means that you can identify file names
that match the pattern *.deb by checking for [[ $pkgname =~ .*\.deb ]]. Note that the doublebracket
syntax [[ ... ]] is required.
Comments
Post a Comment