I've found this nice script to export from a file all the text between two word/string:
Code:
sed '/WORD1 a /!d;s//&\n/;s/.*\n//;:a;/WORD2/bb;$!{n;ba};:b;s//\n&/;P;D' inputfile.txt > output.txt
where WORD1 and WORD2 are these words . It runs beautifully on linux, but if i try to execute it on kindle it gives me this error:
Code:
sed: can't find label for jump to 'a}'
I don't know how to fix it also because I've no idea what does all these paramaeters do in sed command (I know how it works only for simple tasks).
Does anybody know why on kindle it doesn't works as it does on linux? Or another script to do the same task? I've searched a lot through sed / awk forums but can't find nothing other than this...