🐧 Shell Command - root

by Patrick Corgan

Version 4 (October 3, 2023)

Download (723 downloads)

Allows you to send a command (or commands) to the Linux shell, as either root or standard user, and displays any output.

To send more than one command, just put each command on its own line. Commands will be executed in the same shell instance, in the order entered, as entered - warts and all. No attempt whatsoever is made to correct or change punctuation, capitalization, escaping, etc.

A note about the cliEncode() function. One of the things it does is escape any newlines. So if you try to separate multiple commands with newlines, cliEncode will transmogrify them into a single command, which the shell will not recognize.

The flow is currently set up to allow multiple commands, which doesn't use cliEncode. But there are two unconnected blocks (su and peon) that use cliEncode (but don't allow multiple commands) if you want them.

π—‘π—Όπ˜π—²π˜€
-Output from multiple commands will be displayed together, with no indication of which command produced what output (or even where one output ends and the next begins), except that multiple outputs are presented in the same order as the commands that produced them. Example:
ls
cd /
ls
-Any errors will not prevent subsequent commands from being executed, although any error messages generated will still be displayed. Example:
cd No_such_file_or_directory
ls
-When multiple commands are issued, the displayed exit code is from the last command in the list. Compare to above:
ls
cd No_such_file_or_directory

πŸ”Έπ™π™šπ™¦π™ͺπ™žπ™§π™šπ™¨ π™§π™€π™€π™©πŸ”Έbut only if you want to run a command as su.

Non-root version: https://llamalab.com/automate/community/flows/27636

------------------------------
π˜‰π˜Ί π˜—π˜’π˜΅π˜³π˜ͺ𝘀𝘬 𝘊𝘰𝘳𝘨𝘒𝘯
πŸ› οΈπ•”π• π•žπ•žπ•–π•Ÿπ•₯𝕀 π•’π•Ÿπ•• π•”π•£π•šπ•₯π•šπ•”π•šπ•€π•žπ•€ π•¨π•–π•π•”π• π•žπ•–βš’οΈ
------------------------------

Version 2:
-Added basic error trapping.
-Fixed an embarrassing bug in su shell block.

Version 3:
-Added support for multiple commands.
-Minor UI changes.
-Minor bug fix.

Version 4:
-Added ability to choose the directory from which commands will be executed.
-Added option to use cliEncode(). Thank you Ricardo FernΓ‘ndez Serrata.

5.0 average rating from 3 reviews

5 stars
3
4 stars
0
3 stars
0
2 stars
0
1 star
0
Reports
0

Rate and review within the app in the Community section.