2
votes
3answers
457 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 ...
1
vote
3answers
3k views

bash merge 2 lists removing duplicated

I have an embedded linux system using Busybox (OpenWRT) - so commands are limited. I have two files that look like: first file aaaaaa bbbbbb cccccc mmmmmm nnnnnn second file mmmmmm nnnnnn ...
6
votes
2answers
428 views

Which sed version is not GNU sed 4.0?

I'm trying to figure out which version of sed that I've got on BusyBox 1.18.3. The --version output is cryptic. $ sed --version This is not GNU sed version 4.0 The following code is from the ...
2
votes
2answers
310 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..): ...