Print only the content inside double quotes on each line.
Section: sed and Stream Editing
Extract quoted content
bash
bash
sed -En 's/.*"([^"]+)".*/\1/p' file.txtExplanation
The `-n` flag suppresses normal printing; `p` prints only successful substitutions.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing sed and Stream Editing