Created
February 24, 2019 09:24
-
-
Save iamirulofficial/65100af61f4ae220d3bd235a94be8d28 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#Program: Interactive version -uses read to take two inputs | |
echo "Enter the pattern to be searched: \n" | |
read pname | |
echo "Enter the file to be used: \n" | |
read filename | |
echo "Searching for $pname from file $filename" | |
grep "$pname" $filename |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment