How in BASH in a variable to bring the entire contents of a text file so that you can then work with this variable through substring?
For example, I have a text.txt file with lines in it:
<hr> Hello im text now Im text, you know it Or not? I am Text Hi, how are you Text. How do you feel? and so on ... I need, if in the line there is the word "text" to find out which account this character is, and to select a certain number of characters from it and write it to another file.
VAR=$(cat text.txt)- KoVadim