English Amiga Board


Go Back   English Amiga Board > Coders > Coders. System > Coders. Scripting

 
 
Thread Tools
Old 09 February 2013, 10:28   #1
pintcat
Registered User
 
Join Date: Mar 2008
Location: Berlin/Germany
Posts: 210
Question AmigaDOS: call several commands in a single command line

Hi everyone,

I'm wondering if it is possible to call a whole chain of commands in a single command line (executed one by one). In a Linux shell you would use ';' or '&&' to achieve this. Is there a similar way for AmigaDOS?
pintcat is offline  
AdSense AdSense  
Old 09 February 2013, 10:50   #2
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 43
Posts: 21,503
CTRL+J after each command should work.
Toni Wilen is online now  
Old 09 February 2013, 10:55   #3
PeterK
Registered User
 
Join Date: Apr 2005
Location: Hangover
Posts: 2,154
You can get a new line without processing the previous command with [CTRL J]

Code:
 
Try this:
 
echo 1 [CTRL J]
echo 2 [CTRL J]
echo 3 
 
or use Run with a "+" at the end of the line:
 
Run echo 1 +
    echo 2 +
    echo 3
Ok, Toni was faster

Last edited by PeterK; 09 February 2013 at 14:36.
PeterK is offline  
Old 09 February 2013, 14:02   #4
pintcat
Registered User
 
Join Date: Mar 2008
Location: Berlin/Germany
Posts: 210
Thumbs up

ARRRGGH... I was about to complain that your suggestions don't work, but, in fact, they do work if executed in a vanilla CLI or Shell window. On the other hand they behave odd in ViNCEd which is my preferred shell (if I connect several commands with Ctrl+J only the last one will be executed), but I think I can work with that. Thank you very much for your help.
pintcat is offline  
Old 09 February 2013, 14:05   #5
thomas
Registered User
thomas's Avatar
 
Join Date: Jan 2002
Location: Germany
Posts: 5,670
Install Pipe 1.5 from Aminet and follow the docs. Then you can seperate several commands by ||.
thomas is online now  
Old 09 February 2013, 14:33   #6
PeterK
Registered User
 
Join Date: Apr 2005
Location: Hangover
Posts: 2,154
Sorry for the >NIL: in my example....
That was a little bit too ambitious, just pointless for the echo commands.

If you use the pipe, as Thomas suggested, then don't forget to define it in the S:Shell-Startup:
Set _pchar "|"
Set _mchar "||"
PeterK is offline  
Old 09 February 2013, 16:51   #7
pintcat
Registered User
 
Join Date: Mar 2008
Location: Berlin/Germany
Posts: 210
@PeterK: I know, echo was just an example and I got your point.
Pipe is a nice little tool. It also enables you to use PIPE: in a MSDOS/Unix like manner. I'll see about it.
pintcat is offline  
AdSense AdSense  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
AmigaDOS echo command speechmark Retro1234 support.Other 3 01 May 2012 21:14
HDD from command line brolly support.WinUAE 2 29 March 2012 22:46
is there new command line ? turrican3 support.WinUAE 1 15 April 2007 12:21
command line? Drake1009 support.WinUAE 7 14 August 2004 17:17
Command Line. ruttolibero support.WinUAE 1 25 July 2003 15:05

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 22:55.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.
Page generated in 0.07188 seconds with 13 queries