Skip to content

Instantly share code, notes, and snippets.

@manualbashing
Created December 15, 2020 16:14
Show Gist options
  • Save manualbashing/ce54df549239136677f5ce3296266f40 to your computer and use it in GitHub Desktop.
Save manualbashing/ce54df549239136677f5ce3296266f40 to your computer and use it in GitHub Desktop.
Use sed to extract all image paths from html file
# The assignment is neede to treat the return value of sed as array
IFS=$'\n' pictures=($(cat /home/mbatsching/git/abtis-cmp/deploy/powerbi/powerbi-update-datasource-credentials.template.html | grep img | sed -E 's/.*img src="([^"]+)".*/\1/g'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment