Template:Commands/Doc: Difference between revisions
Appearance
Created page with "{{Template}}{{DISPLAYTITLE:Template:commands}} {{META Pipe Character}} == Usage == Take care of always aligning the {{ic|$}} to the left. {{bc|<nowiki>{{Commands|$ command-not-found}}</nowiki>}} {{bc|<nowiki>{{Commands| $ command-not-found $ other-command }}</nowiki>}} {{bc|<nowiki>{{Commands|$ cat /proc/cpuinfo {{!}} grep '^model name' {{!}} head -n1}}</nowiki>}} {{bc|<nowiki>{{Commands|<nowiki> # Disregard useless use of cat $ cat /proc/cpuinfo | grep '^model..." |
No edit summary |
||
Line 1: | Line 1: | ||
{{META Pipe Character}} | {{META Pipe Character}} | ||
Latest revision as of 20:30, 5 June 2025
Special note
The pipe character cannot be used as is within the template, as it is a special characters for templates.
It can be included using the magic word {{!}}
.
Alternatively, it is possible to instead surround the contents in <nowiki>
tags.
Usage
Take care of always aligning the $
to the left.
{{Commands|$ command-not-found}}
{{Commands| $ command-not-found $ other-command }}
{{Commands|$ cat /proc/cpuinfo {{!}} grep '^model name' {{!}} head -n1}}
{{Commands|<nowiki> # Disregard useless use of cat $ cat /proc/cpuinfo | grep '^model name' | head -n1 </nowiki>}}
Example
$ command-not-found
$ command-not-found
$ other-command
$ cat /proc/cpuinfo | grep '^model name' | head -n1
# Disregard useless use of cat
$ cat /proc/cpuinfo | grep '^model name' | head -n1