2
votes
3answers
428 views

Script matching literal pattern over multiple lines?

I have a multi-line string in the variable $PAT. $PAT must be searched for within the file $FILE. If $PAT is in $FILE, it needs to print the file with $PAT removed. If $PAT is not found, then print ...
2
votes
5answers
7k views

Bash iterate over a list of strings

I have this bash script: for opt in string1 string2 string3 ... string99 do somestuff It works, but I would like to replace the explicit listing of my strings with a file which actually contains ...
2
votes
2answers
307 views

non-case-sensitive sed - OpenWrt

the input would be like this in a file: <sCripT and the parsing looks like this: sed -i "s/<script//g" SOMETHING.html the "/gi" is not good, because OpenWrt doesn't knows it (busybox..): ...