[TriLUG] Single line scripts

Mauricio Tavares via TriLUG trilug at trilug.org
Mon Sep 5 18:05:51 EDT 2016


      Going on a tangent, what are you trying to accomplish? Depending
on what you are trying to do, have you considering remotely sending
the commands using ansible, expect, or even plain old ssh+bash
(http://unixwars.blogspot.com/2015/12/remotely-controlling-esxi-with-bash-and.html
for an example)?

On Mon, Sep 5, 2016 at 5:07 PM, Steve Litt via TriLUG <trilug at trilug.org> wrote:
> On Mon, 05 Sep 2016 15:34:52 -0400
> Grawburg via TriLUG <trilug at trilug.org> wrote:
>
>> I have long commands I enter in a terminal, such as starting
>> connecting to a Raspberry Pi located several floors away with ssh, or
>> setting up a connection to my NAS (rather than having a line
>> in /etc/fstab). I can simply have a text file saved and do a copy and
>> paste into terminal each time I need it, but I'd like to turn it into
>> a what I would have called a .bat file decades ago.
>
> The term you're looking for is "shellscript", and although they
> can have any file extension, but ".sh" is idiomatic.
>
>
>> Is this something
>> I should learn to to do in bash?
>
> Yes. Definitely. Running a shellscript is far superior to opening a file
> and pasting a command onto the command line.
>
>> I don't need multiple lines, there
>> is no extra coding, just a single line.
>
> If these shellscripts will be simple, this becomes an excellent use
> case for UMENU2:
>
> http://troubleshooters.com/projects/umenu2/
>
> SteveT
>
> Steve Litt
> September 2016 featured book: Twenty Eight Tales of Troubleshooting
> http://www.troubleshooters.com/28
>
>
> --
> This message was sent to: raubvogel at gmail.com <raubvogel at gmail.com>
> To unsubscribe, send a blank message to trilug-leave at trilug.org from that address.
> TriLUG mailing list : http://www.trilug.org/mailman/listinfo/trilug
> Unsubscribe or edit options on the web  : http://www.trilug.org/mailman/options/trilug/raubvogel%40gmail.com
> Welcome to TriLUG: http://trilug.org/welcome


More information about the TriLUG mailing list