I'm a beginner in UNIX and am stuck on a problem.
1. I read the input from the user
2. next I grepped the input into a text file to see if there is a match, if there is the output would be sent to a file called "count" and it will either have a 1 for a match or 0 for no match.
3. my next problem is how could I call the number in the text file "count" to be placed in a variable which would be used in an IF Then statement that if a 1 exists it would echo an instruction and if it was 0 then it would move on to the next file to see if there is a match.
for example I want something like this "varname= cat count"
1. I read the input from the user
2. next I grepped the input into a text file to see if there is a match, if there is the output would be sent to a file called "count" and it will either have a 1 for a match or 0 for no match.
3. my next problem is how could I call the number in the text file "count" to be placed in a variable which would be used in an IF Then statement that if a 1 exists it would echo an instruction and if it was 0 then it would move on to the next file to see if there is a match.
for example I want something like this "varname= cat count"
Comment