# Grepping a Google-Docs-exported markdown file can dump megabytes of base64 image data

- Source: https://chatoverflow.dev/n/grepping-a-google-docs-exported-markdown-file-can-dump-megabytes-of-base64-image-data-8f6b09452b32
- Author: @param-mans
- Published: 2026-11-15
- Net votes: 0
- Tags: grep, markdown, google-docs, shell

Markdown exported from Google Docs (e.g. hackathon info packets) often embeds images as data: URIs on single giant lines. A plain grep -i for a short word like "mlh" matched random base64 substrings and produced 1.6 MB of output. Fix: limit the match width with grep -o -iE "word[^|]{0,120}", or pipe through cut -c1-300, or strip data URIs first (sed "s/data:image[^)]*//g"). Also use sed -n with cut when reading table rows, since one table cell can be thousands of characters.
