07 December 2022, 19:12 | #1 |
Registered User
Join Date: Feb 2017
Location: Denmark
Posts: 1,099
|
CLI: Execute two commands
Is it possible to execute two commands on the same line in the CLI (in 3.0+) like you'd do with (unix) sh
echo foo; echo baror (windows) cmd echo foo & echo bar? If it matters, I don't care about echoing, I just want to run two programs (concretely something like <relative path>/download_program and program_copied <arguments>). Making a script with two lines works, but I find myself doing this in many different directories, and it's no big deal, but could save a few keystrokes . |
07 December 2022, 19:22 | #2 |
WinUAE developer
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,505
|
Type command 1, press Control+J, type command 2. Return. Possibly there are also other ways.
|
07 December 2022, 19:40 | #3 |
Registered User
Join Date: Feb 2017
Location: Denmark
Posts: 1,099
|
Thanks, that answers my question but made me realize I forgot an implicit requirement (sorry).
I now realize what I do is: Code:
>cmd1 >cmd2 up-arrow up-arrow enter up-arrow up-arrow enter |
07 December 2022, 20:21 | #4 |
Registered User
Join Date: Jan 2002
Location: Germany
Posts: 6,985
|
With the Pipe command in C: and after following its installation instructions, you should be able to type cmd1 || cmd2.
http://aminet.net/package/util/shell/Pipe-1.5 |
07 December 2022, 20:22 | #5 | |
Registered User
Join Date: Jan 2019
Location: Germany
Posts: 3,215
|
Quote:
The "&" exists since V45. The "&&" exists since V47. |
|
08 December 2022, 08:24 | #6 |
Registered User
Join Date: Feb 2017
Location: Denmark
Posts: 1,099
|
Thanks, the pipe commands does the trick on my ancient OS installation. Also good to know there's a built-in option once I get around to upgrading
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Open source CLI commands | Mrs Beanbag | Coders. System | 13 | 10 December 2016 09:50 |
Execute file without using execute | VoltureX | support.Apps | 3 | 01 December 2011 09:59 |
List your favourite cli/shell commands replacements. | ppill | request.Apps | 4 | 10 December 2010 14:48 |
Cli program to "execute" .info files | olesio | support.Apps | 4 | 05 September 2010 19:19 |
Execute a list of commands by doublclicking an icon. | e5frog | support.Other | 5 | 26 July 2010 16:26 |
|
|