Jump to content

Shell one-liner: Difference between revisions

(Add lang example)
(→‎sed: add)
Line 770:
{{works with|Guile}}
<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}}==
559

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.