New answers tagged

1

Start with something like this: for zf in *.zip ; do base=${zf/\.zip/} echo "$zf" unzip -p "$zf" "$base.SAFE/preview/map-overlay.kml" | sed -ne '/<gx:/,/<\/gx:/p' done This pipes the .../map-overlay.kml file from each .zip file into sed, which prints only the lines between <gx: and </gx:. Alternatively, if you only want the <...


0

You could use pcregrep if available, with the -l switch, to only list the names of files that match: pcregrep -lM '(?s)advanced_override\.begin.*PREFETCH.*advanced_override\.end' ./* This searches in multiline mode for those two strings with PREFETCH in between. It assumes there are only text files in the current directory (if that's not the case you ...



Top 50 recent answers are included