In: Computer Science
linux Regular expressions
file name: lab3test.txt
Create regular expressions that meet the following criteria. You may use grep or egrep to answer these questions.
1.Display all lines where the employee’s age is greater than 40 years old. Again, don’t think of this as a number, think of it as a series of characters.
grep -E "forty|fifty|sixty|seventy|eighty" lab3test.txt
here I assume that employees age is not higher than eighty if you want to be more specific with that you can add it in end. for reference, I attached a screenshot with this.
thankyou
if you are happy with this answer please upvote me . and please don't press down vote it will get more complication to me