dos command
Hi,
How can I send in one line two different dos command ?
Thanks
Signature · 2 lines
View this message in context: http://www.nabble.com/dos-command-tp19824395p19824395.html Sent from the linux-msdos mailing list archive at Nabble.com.
Quoted 1 line · On Sun, 5 Oct 2008 07:53:24 -0700 (PDT) idan72 <[email protected]> wrote:
How can I send in one line two different dos command ?
Do you mean that you want to pipe the output of one command to another? If so, you just separate the commands with a | character ( which is shift-\ on most keyboards).
type file.txt | more
That will take the output of the type command and pipe it into the more command.
If you just want to feed commands to the command line one at a time but type just one thing, then you need to write a batch file, which is just a text file that contains the commands that you want to run. dosemu comes with a batch file called autoexec.bat in the c:\ directory -- take a look at that for an example of how to write one.
Signature · 2 lines
MELVILLE THEATRE ~ Melville Sask ~ http://www.melvilletheatre.com DRY CLEANER BUSINESS FOR SALE ~ http://www.canadadrycleanerforsale.com
Hi Frank,
I have java program that I want to execute batch from it. I want to set environment variable before I run the batch file. For example the 2 commands I want to run are:
1. set val=5
2. a.bat
Sample how it was in Unix:
[ishai@mip-devtest ishai]$ export val=7;a.bat
7
[ishai@mip-devtest ishai]$ cat a.bat
echo $val
[ishai@mip-devtest ishai]$
Thanks
Idan
-----Original Message-----
From: Frank Cox [mailto:[email protected]]
Sent: Sunday, October 05, 2008 8:36 PM
To: Idan Shai (ishai)
Cc: [email protected]
Subject: Re: dos command
Quoted 1 line · On Sun, 5 Oct 2008 07:53:24 -0700 (PDT) idan72 <[email protected]> wrote:
How can I send in one line two different dos command ?
Do you mean that you want to pipe the output of one command to another? If so, you just separate the commands with a | character ( which is shift-\ on most keyboards).
type file.txt | more
That will take the output of the type command and pipe it into the more command.
If you just want to feed commands to the command line one at a time but type just one thing, then you need to write a batch file, which is just a text file that contains the commands that you want to run. dosemu comes with a batch file called autoexec.bat in the c:\ directory -- take a look at that for an example of how to write one.
--
MELVILLE THEATRE ~ Melville Sask ~ http://www.melvilletheatre.com DRY CLEANER BUSINESS FOR SALE ~ http://www.canadadrycleanerforsale.com
Quoted 5 lines · On Sun, 05 Oct 2008 21:24:06 +0200 "Idan Shai (ishai)" <[email protected]> wrote:
I have java program that I want to execute batch from it. I want to set environment variable before I run the batch file. For example the 2 commands I want to run are:
1. set val=5
2. a.bat
1) Make the first line of a.bat read "set val=5" (without the quotes)
or
2) Make a second batch file that calls a.bat, as in this example:
set val=5
a
Save that as b.bat and run b.bat when you want to run the program.
Signature · 2 lines
MELVILLE THEATRE ~ Melville Sask ~ http://www.melvilletheatre.com DRY CLEANER BUSINESS FOR SALE ~ http://www.canadadrycleanerforsale.com
Hi Frank,
Thanks for your answer.
If I understand your suggestion is to create at runtine the batch file as I don't know what the value if I will need to set for val.
Isn't a way in dos to run 2 commands or more in same line as in Unix for example ?
Thanks
Idan
-----Original Message-----
From: Frank Cox [mailto:[email protected]]
Sent: Sunday, October 05, 2008 9:31 PM
To: Idan Shai (ishai)
Cc: [email protected]
Subject: Re: dos command
Quoted 5 lines · On Sun, 05 Oct 2008 21:24:06 +0200 "Idan Shai (ishai)" <[email protected]> wrote:
I have java program that I want to execute batch from it. I want to set environment variable before I run the batch file. For example the 2 commands I want to run are:
1. set val=5
2. a.bat
1) Make the first line of a.bat read "set val=5" (without the quotes)
or
2) Make a second batch file that calls a.bat, as in this example:
set val=5
a
Save that as b.bat and run b.bat when you want to run the program.
--
MELVILLE THEATRE ~ Melville Sask ~ http://www.melvilletheatre.com DRY CLEANER BUSINESS FOR SALE ~ http://www.canadadrycleanerforsale.com