Skip to content

[tools/check] Combine grep/sed calls using "-e".#9225

Open
tkoeppe wants to merge 1 commit into
cplusplus:mainfrom
tkoeppe:sub-e
Open

[tools/check] Combine grep/sed calls using "-e".#9225
tkoeppe wants to merge 1 commit into
cplusplus:mainfrom
tkoeppe:sub-e

Conversation

@tkoeppe

@tkoeppe tkoeppe commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

This reduces the number of subprocesses that are spawned.

This reduces the number of subprocesses that are spawned.
@tkoeppe
tkoeppe requested a review from jensmaurer July 23, 2026 12:54
Comment thread tools/check-output.sh
sed -n 's,//.*$,,;s/%.*$//;s/"[^"]*"/""/;/begin{itemdecl}/,/end{itemdecl}/{/[^-_a-z]\('"$patt"'\)[^-_a-z();,]/{/concept{[a-z_-]*}/d;=;p;};}' $f |
# prefix output with filename and line
sed '/^[0-9]\+$/{N;s/\n/:/;}' | sed "s/.*/$f:&/" |
sed -e '/^[0-9]\+$/{N;s/\n/:/;}' -e "s/.*/$f:&/" |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can do a grep -v with sed too.

	sed -e '/^[0-9]\+$/{N;s/\n/:/;}' -e  "s/.*/$f:&/" \
	  -e "/@.seebelow/d" \
	  -e "s/\$/ -- concept name without markup/" |
	fail || failed=1

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, just by deleting the matching lines? Not bad!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants