Shell one-liner: Difference between revisions
Content added Content deleted
(Add lang example) |
(→sed: add) |
||
Line 770: | Line 770: | ||
{{works with|Guile}} |
{{works with|Guile}} |
||
<syntaxhighlight lang="scheme">guile -c '(display "Hello, world!\n")'</syntaxhighlight> |
<syntaxhighlight lang="scheme">guile -c '(display "Hello, world!\n")'</syntaxhighlight> |
||
=={{header|sed}}== |
|||
The first non-option argument is interpreted as the script. |
|||
<syntaxhighlight lang="sh">$ sed q /proc/meminfo</syntaxhighlight> |
|||
Alternatively, scripts can be passed via the <code>-e</code> option. |
|||
<syntaxhighlight lang="sh">$ sed -e 's/[[:space:]]*$//' -e '/./!d' file.txt</syntaxhighlight> |
|||
=={{header|Shiny}}== |
=={{header|Shiny}}== |