How do I write a statement in dos using shell script to display a word?
April 16, 2010 - 11:14 am
I want to write a shell script in dos to display the word "Hello"
use the ECHO command:
echo Hello
or
@echo Hello
(@ keeps the command line from printing out)
"echo" with a dot:
echo.
displays a blank line
you can also add
pause>nul
to keep the shell script from closing (until a key is pressed)
so the ideal script would look something like:
@echo Hello
@pause>nul
or
@echo off
echo Hello
pause>nul
April 16th, 2010 at 4:19 pm
Just did a google search for "hello world" dos shell script, that should be a good start for you, good luck.
References :
http://www.febooti.com/products/command-line-email/batch-files/first-dos-batch-script.html
April 16th, 2010 at 5:01 pm
use the ECHO command:
echo Hello
or
@echo Hello
(@ keeps the command line from printing out)
"echo" with a dot:
echo.
displays a blank line
you can also add
pause>nul
to keep the shell script from closing (until a key is pressed)
so the ideal script would look something like:
@echo Hello
@pause>nul
or
@echo off
echo Hello
pause>nul
References :