- #1
Arnoldjavs3
- 191
- 3
Homework Statement
Say I have a textfile that is separated by columns, and I want to search columns 10-15. If there are any matches, then I want to cut out specific parts of all the matches and print it to the user. How do I do this?
Homework Equations
The Attempt at a Solution
What I tried was:
cut -c 10-15 textfile.txt | grep -q $userInput
But then how would I cut out the specific results from this entry?
I want to search columns 10-15, then print out columns 20-35 of all results from that search.