I want to read text between two particular words from a text file in unix shell scripting. For example in the following:
"My name is Sasuke Uchiha."
I want to get Sasuke.
I want to read text between two particular words from a text file in unix shell scripting. For example in the following:
"My name is Sasuke Uchiha."
I want to get Sasuke.
I'm tempted to add a "let me google that for you" link, but it seems like you're having a hard enough time as is.
What's the best way to find a string/regex match in files recursively? (UNIX)
Take a look at that. It's similar to what you're looking for. Regex is the go to tool for matching strings and such. And Grep is the easiest way to use it from shell in unix.
Take a look at this as well: http://www.robelle.com/smugbook/regexpr.html