I just want to know how AWK, grep and find command differ from each other in terms of functionalities and which command to use when?
Asked
Active
Viewed 104 times
0
-
2check `find` command. No need of awk or grep. – P.... May 29 '17 at 09:03
-
thanks @rohinjose for the suggested edits. – deepayan das May 29 '17 at 09:05
-
1Warning - tongue in cheek remark to follow... use `grep` if you just want to find something, use `awk` if you then want to do something with it, and use `sed` if you like arcane, illegible commands ;-) – Mark Setchell May 29 '17 at 10:23
-
Thanks @MarkSetchell. This was mighty useful. – deepayan das May 29 '17 at 10:27
1 Answers
1
The command would be
find . -type d -name '*word*'

arboreal84
- 2,086
- 18
- 21
-
Thanks, @arboreal84. That definitely worked. In order to delete the listed directories I used `find . -type d -name '*word*'| xargs -I% rm -rf %`. – deepayan das May 29 '17 at 09:10