🐧 Shell Command - Standard

by Patrick Corgan

Version 4 (October 3, 2023)

Download (331 downloads)

Allows you to send a command (or multiple commands) to the Linux shell as a 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 is an unconnected block that uses cliEncode (but doesn't allow multiple commands) if you want it.

π—‘π—Όπ˜π—²π˜€
-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

Superuser version: https://llamalab.com/automate/community/flows/18752

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

Version 2:
-Added basic error trapping.
-Added support for multiple commands.
-Minor UI changes.

Version 3: Now uses cliEncode(). Thank you Ricardo FernΓ‘ndez Serrata.

Version 4:
-Added the ability to choose the directory from which commands will be executed.
-cliEncode () is now optional.

5.0 average rating from 1 reviews

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

Rate and review within the app in the Community section.