Get system command output: Difference between revisions

Content added Content deleted
(Added Quackery.)
m (Move Quackery into alphabetic order. Q is before R!)
Line 1,162: Line 1,162:


>>> # Ref: https://docs.python.org/3/library/subprocess.html</lang>
>>> # Ref: https://docs.python.org/3/library/subprocess.html</lang>

=={{header|R}}==
<lang rsplus>
system("wc -l /etc/passwd /etc/group", intern = TRUE)
</lang>
{{out}}
<pre>
[1] " 49 /etc/passwd" " 80 /etc/group" " 129 total"
</pre>


=={{header|Quackery}}==
=={{header|Quackery}}==


As a dialogue in the Quackery shell. Execute the system command ls and store the result on the Quackery data stack as a string. Reverse that string and print onscreen.
As a dialogue in the Quackery shell. Execute the system command <code>ls</code> and store the result on the Quackery data stack as a string. Reverse that string and print it.




Line 1,193: Line 1,184:
txt.TSRIF EM DAER
txt.TSRIF EM DAER
fdp.ecnerefeR kciuQ yrekcauQ
fdp.ecnerefeR kciuQ yrekcauQ
</pre>

=={{header|R}}==
<lang rsplus>
system("wc -l /etc/passwd /etc/group", intern = TRUE)
</lang>
{{out}}
<pre>
[1] " 49 /etc/passwd" " 80 /etc/group" " 129 total"
</pre>
</pre>