Template:Commands: Difference between revisions

imported>Samueldr
m Uses common styles for commands.
Sdht0 (talk | contribs)
Add proper sections
Line 2: Line 2:
{{META Pipe Character}}
{{META Pipe Character}}


===Usage===
== Usage ==


Take care of always aligning the {{ic|$}} to the left.
Take care of always aligning the {{ic|$}} to the left.
Line 13: Line 13:
}}</nowiki>}}
}}</nowiki>}}


===Example===
{{bc|<nowiki>{{Commands|$ cat /proc/cpuinfo {{!}} grep '^model name' {{!}} head -n1}}</nowiki>}}
 
{{bc|<nowiki>{{Commands|&lt;nowiki>
# Disregard useless use of cat
$ cat /proc/cpuinfo | grep '^model name' | head -n1
&lt;/nowiki>}}</nowiki>}}
 
== Example ==
{{Commands|$ command-not-found}}
{{Commands|$ command-not-found}}


Line 20: Line 27:
$ other-command
$ other-command
}}
}}
Example with wrong alignment
{{Commands|
$ command-not-found
$ other-command
$ final-command
}}
====Escaping pipe====
''Look at the source to see usage.''


{{Commands|$ cat /proc/cpuinfo {{!}} grep '^model name' {{!}} head -n1}}
{{Commands|$ cat /proc/cpuinfo {{!}} grep '^model name' {{!}} head -n1}}