I am trying to write a script that will allow me to do the following:
Consider a file called NUMBERS containing entries such as:
123456
123444
123476
345678
345677
The script when run will prompt the user to enter a number. Then it will look in NUMBERS file and display any numbers that contain the same numbers. For example, if the user entered 123, then the following numbers will be displayed to the screen:
123456
123444
123476
Is there a function or operator that will allow me to match in this way? Or any useful threads with anything similar would be much appreciated. Thanks.
Consider a file called NUMBERS containing entries such as:
123456
123444
123476
345678
345677
The script when run will prompt the user to enter a number. Then it will look in NUMBERS file and display any numbers that contain the same numbers. For example, if the user entered 123, then the following numbers will be displayed to the screen:
123456
123444
123476
Is there a function or operator that will allow me to match in this way? Or any useful threads with anything similar would be much appreciated. Thanks.