<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>
GitLab
</title>



<style>img {
max-width: 100%; height: auto;
}
</style>
</head>
<body>
<div class="content">
<p class="details" style="font-style: italic; color: #777;">
<a href="https://gitlab.com/lumag">Dmitry Eremin-Solenikov</a>
started a new discussion
on <a href="https://gitlab.com/gnutls/gnutls/commit/6099715eefb08e8bff3265ebdc48f2a051cb0527#note_104216166">src/gen-mech-list.sh</a>:
</p>
<table>
<tr class="line_holder" id="">
<td class="diff-line-num old_line" data-linenumber="8" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
8
</td>
<td class="diff-line-num new_line" data-linenumber="8" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
8
</td>
<td class="line_content noteable_line" style="padding-left: 0.5em; padding-right: 0.5em;">
<pre style="margin: 0;"> <span id="LC8" class="line" lang="shell"><span class="c" style="color: #998; font-style: italic;"># Exclude duplicate and uninteresting entries</span></span>
</pre>
</td>
</tr>
<tr class="line_holder" id="">
<td class="diff-line-num old_line" data-linenumber="9" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
9
</td>
<td class="diff-line-num new_line" data-linenumber="9" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
9
</td>
<td class="line_content noteable_line" style="padding-left: 0.5em; padding-right: 0.5em;">
<pre style="margin: 0;"> <span id="LC9" class="line" lang="shell"><span class="nv" style="color: teal;">EXCLUDED</span><span class="o" style="font-weight: 600;">=</span><span class="s2" style="color: #d14;">"(CKM_VENDOR_DEFINED</span><span class="se" style="color: #d14;">\s</span><span class="s2" style="color: #d14;">|CKM_CAST128_MAC</span><span class="se" style="color: #d14;">\s</span><span class="s2" style="color: #d14;">|CKM_CAST128_KEY_GEN</span><span class="se" style="color: #d14;">\s</span><span class="s2" style="color: #d14;">|CKM_CAST128_ECB</span><span class="se" style="color: #d14;">\s</span><span class="s2" style="color: #d14;">|CKM_CAST128_CBC</span><span class="se" style="color: #d14;">\s</span><span class="s2" style="color: #d14;">|CKM_CAST128_MAC_GENERAL</span><span class="se" style="color: #d14;">\s</span><span class="s2" style="color: #d14;">|CKM_CAST128_CBC_PAD</span><span class="se" style="color: #d14;">\s</span><span class="s2" style="color: #d14;">|CKM_PBE_MD5_CAST128_CBC</span><span class="se" style="color: #d14;">\s</span><span class="s2" style="color: #d14;">|CKM_PBE_SHA1_CAST128_CBC</span><span class="se" style="color: #d14;">\s</span><span class="s2" style="color: #d14;">|CKM_EC_KEY_PAIR_GEN</span><span class="se" style="color: #d14;">\s</span><span class="s2" style="color: #d14;">)"</span></span>
</pre>
</td>
</tr>
<tr class="line_holder" id="">
<td class="diff-line-num old_line" data-linenumber="10" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
10
</td>
<td class="diff-line-num new_line" data-linenumber="10" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
10
</td>
<td class="line_content noteable_line" style="padding-left: 0.5em; padding-right: 0.5em;">
<pre style="margin: 0;"> <span id="LC10" class="line" lang="shell"></span>
</pre>
</td>
</tr>
<tr class="line_holder old" id="">
<td class="diff-line-num old old_line" data-linenumber="11" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #fac5cd; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#f9d7dc">
11
</td>
<td class="diff-line-num new_line old" data-linenumber="11" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #fac5cd; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#f9d7dc">
 
</td>
<td class="line_content noteable_line old" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#fbe9eb">
<pre style="margin: 0;">-<span id="LC11" class="line" lang="shell"><span class="nb" style="color: #0086b3;"><span class="idiff left">cat</span></span><span class="idiff"> </span><span class="k" style="font-weight: 600;"><span class="idiff">${</span></span><span class="nv" style="color: teal;"><span class="idiff">HEADER</span></span><span class="k" style="font-weight: 600;"><span class="idiff">}</span></span><span class="idiff">|grep </span><span class="nt" style="color: navy;"><span class="idiff">-E</span></span><span class="idiff"> </span><span class="s2" style="color: #d14;"><span class="idiff">"define</span></span><span class="se" style="color: #d14;"><span class="idiff">\s</span></span><span class="s2" style="color: #d14;"><span class="idiff">CKM_"</span></span><span class="idiff">|grep </span><span class="nt" style="color: navy;"><span class="idiff">-vE</span></span><span class="idiff"> </span><span class="s2" style="color: #d14;"><span class="idiff">"</span></span><span class="k" style="font-weight: 600;"><span class="idiff">${</span></span><span class="nv" style="color: teal;"><span class="idiff">EXCLUDED</span></span><span class="k" style="font-weight: 600;"><span class="idiff">}</span></span><span class="s2" style="color: #d14;"><span class="idiff">"</span></span><span class="idiff">|awk </span><span class="s1" style="color: #d14;"><span class="idiff right">'{print "\t["$3"] = \""$2"\","}'</span></span></span>
</pre>
</td>
</tr>
<tr class="line_holder new" id="">
<td class="diff-line-num new old_line" data-linenumber="12" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
 
</td>
<td class="diff-line-num new new_line" data-linenumber="11" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
11
</td>
<td class="line_content new noteable_line" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#ecfdf0">
<pre style="margin: 0;">+<span id="LC11" class="line" lang="shell"><span class="nv" style="color: teal;"><span class="idiff left">TMPFILE</span></span><span class="o" style="font-weight: 600;"><span class="idiff">=</span></span><span class="idiff">list.</span><span class="nv" style="color: teal;"><span class="idiff">$$</span></span><span class="idiff right">.tmp</span></span>
</pre>
</td>
</tr>
<tr class="line_holder" id="">
<td class="diff-line-num old_line" data-linenumber="12" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
12
</td>
<td class="diff-line-num new_line" data-linenumber="12" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
12
</td>
<td class="line_content noteable_line" style="padding-left: 0.5em; padding-right: 0.5em;">
<pre style="margin: 0;"> <span id="LC12" class="line" lang="shell"></span>
</pre>
</td>
</tr>
<tr class="line_holder new" id="">
<td class="diff-line-num new old_line" data-linenumber="13" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
 
</td>
<td class="diff-line-num new new_line" data-linenumber="13" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
13
</td>
<td class="line_content new noteable_line" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#ecfdf0">
<pre style="margin: 0;">+<span id="LC13" class="line" lang="shell"><span class="nb" style="color: #0086b3;">cat</span> <span class="k" style="font-weight: 600;">${</span><span class="nv" style="color: teal;">HEADER</span><span class="k" style="font-weight: 600;">}</span>|grep <span class="nt" style="color: navy;">-E</span> <span class="s2" style="color: #d14;">"define</span><span class="se" style="color: #d14;">\s</span><span class="s2" style="color: #d14;">CKM_"</span>|grep <span class="nt" style="color: navy;">-vE</span> <span class="s2" style="color: #d14;">"</span><span class="k" style="font-weight: 600;">${</span><span class="nv" style="color: teal;">EXCLUDED</span><span class="k" style="font-weight: 600;">}</span><span class="s2" style="color: #d14;">"</span>|awk <span class="s1" style="color: #d14;">'{print "\t["$3"] = \""$2"\","}'</span> <span class="o" style="font-weight: 600;">></span><span class="k" style="font-weight: 600;">${</span><span class="nv" style="color: teal;">TMPFILE</span><span class="k" style="font-weight: 600;">}</span></span>
</pre>
</td>
</tr>
<tr class="line_holder new" id="">
<td class="diff-line-num new old_line" data-linenumber="13" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
 
</td>
<td class="diff-line-num new new_line" data-linenumber="14" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
14
</td>
<td class="line_content new noteable_line" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#ecfdf0">
<pre style="margin: 0;">+<span id="LC14" class="line" lang="shell"><span class="nb" style="color: #0086b3;">cat</span> <span class="k" style="font-weight: 600;">${</span><span class="nv" style="color: teal;">TMPFILE</span><span class="k" style="font-weight: 600;">}</span>|sort|uniq</span>
</pre>
</td>
</tr>

</table>
<div>
<p dir="auto">Why do you need to split these pipelines instead of just <code>cat ${HEADER} | grep -E "..." | grep -vE "..." | awk '{...}' | sort | uniq</code>? Or even <code>... | sort -u</code>?</p>
</div>


</div>
<div class="footer" style="margin-top: 10px;">
<p style="font-size: small; color: #777;">

<br>
Reply to this email directly or <a href="https://gitlab.com/gnutls/gnutls/commit/6099715eefb08e8bff3265ebdc48f2a051cb0527#note_104216166">view it on GitLab</a>.
<br>
You're receiving this email because of your account on gitlab.com.
If you'd like to receive fewer emails, you can
adjust your notification settings.
<script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","action":{"@type":"ViewAction","name":"View Commit","url":"https://gitlab.com/gnutls/gnutls/commit/6099715eefb08e8bff3265ebdc48f2a051cb0527#note_104216166"}}</script>
</p>
</div>
</body>
</html>