Search Results

Search: Posts Made By: Aia
2,466
Posted By Aia
You are correct, it will match the pattern any...
You are correct, it will match the pattern any where in the string variable. However, adding the beginning of line anchor will produce what you want.
if [[ $file =~ ^22 ]]; then echo yes;fi
Showing results 1 to 1 of 1

 
All times are GMT -4. The time now is 08:08 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy