Who can help me?

Delete all lines that contain the word "tree" of a given file SED
Find in a given file, all lines that contain the word "tree" followed by the word "apple " GREP

1. sed '/tree/d' urfile
2. echo "tree apple
sss apple
tree xx" |grep -P "tree(?= apple)"
tree apple
1 Like
Moderator comments were removed during original forum migration.
Moderator comments were removed during original forum migration.