2018-05-21 21:14:41 +02:00
|
|
|
---
|
|
|
|
layout: common
|
|
|
|
---
|
|
|
|
|
|
|
|
{% capture bin_name %}{% include get_bin_name path=page.path %}{% endcapture %}
|
|
|
|
|
|
|
|
{% include page_title.html title=bin_name %}
|
|
|
|
|
|
|
|
{% include function_list.html bin=page %}
|
|
|
|
|
|
|
|
{{ page.description | markdownify }}
|
|
|
|
|
|
|
|
{% for function in page.functions %}
|
|
|
|
|
|
|
|
{% assign function_name = function[0] %}
|
|
|
|
{% assign examples = function[1] %}
|
|
|
|
|
|
|
|
<h2 id="{{ function_name }}" class="function-name">
|
2018-05-29 21:52:10 +02:00
|
|
|
{{- site.data.functions[function_name].label -}}
|
2018-05-21 21:14:41 +02:00
|
|
|
</h2>
|
|
|
|
|
|
|
|
{{ site.data.functions[function_name].description | markdownify }}
|
|
|
|
|
2018-05-22 12:24:49 +02:00
|
|
|
<div class="examples">
|
|
|
|
|
2018-05-29 21:52:10 +02:00
|
|
|
{% for example in examples %}
|
2018-05-21 21:14:41 +02:00
|
|
|
|
|
|
|
{% capture code %}
|
|
|
|
{%- if function_name == 'suid-enabled' or function_name == 'suid-limited' %}
|
|
|
|
cp $(which {{ bin_name }}) .
|
2018-05-30 12:12:48 +02:00
|
|
|
sudo sh -c 'chown 0 ./{{ bin_name }}; chmod +s ./{{ bin_name }}'
|
2018-05-21 21:14:41 +02:00
|
|
|
{% endif %}
|
|
|
|
{{ example.code }}
|
|
|
|
{% endcapture %}
|
|
|
|
|
2018-05-29 21:52:10 +02:00
|
|
|
<div class="example">
|
|
|
|
{{ example.description | markdownify }}
|
|
|
|
<pre><code>{{- code | strip -}}</code></pre>
|
|
|
|
</div>
|
2018-05-21 21:14:41 +02:00
|
|
|
|
2018-05-29 21:52:10 +02:00
|
|
|
{% endfor %}
|
2018-05-21 21:14:41 +02:00
|
|
|
|
2018-05-22 12:24:49 +02:00
|
|
|
</div>
|
|
|
|
|
2018-05-21 21:14:41 +02:00
|
|
|
{% endfor %}
|