Hello world project extravaganza, the Windos command line version.
Synopsis
This repository contains a collection of “Hello World” command-line batch programs; from the simplest “Hello World” batch program to a “Hello World” more complex. This is part of a fun and educational project that showcases how to print “Hello World” in different programming languages. The goal is to have a “Hello World” program in every programming language. This project is inspired by the GitHub Hello World project and you can found it in Hello World Extravaganza website.
check out the code
To get started, clone this repository to your local machine:
git clone https://github.com/silviotorre/helloworld.git
Getting Started
To run the “Hello World” program navigate to the project directory and run the program. Follow the instructions below to run the “Hello World” command-line batch program.
Some info: A command-line batch program, commonly referred to as a batch file, is a file containing a series of commands that are executed by the Windows command prompt. Batch files have a .bat file extension. Batch files are useful for running a sequence of executables automatically and are often used to automate repetitive processes as system admin tasks. Batch files can also be used to create a simple command-line interface for a program or script.
- open a command prompt or terminal
- go in the cmd directory of hello world project and then compile the program by opening a terminal or command prompt, navigating to the directory where you saved the HelloWorld.bat file.
- Run the program by typing HelloWorld, this is not case sensitive so you can type “helloworld”, “HelloWorld” or “HeLlOwOrLd” result are the same. then the program should output Hello, World! and wait until you press a key for exit.
- Alternatively, you can run the program by double-clicking the HelloWorld.bat file. This should also output Hello, World! and wait until you press a key for exit.
An advanced “Hello World” command-line batch program
Windows command line character by character, you can use a loop to iterate through each character of the message and print them one by one. .
- open a command prompt or terminal
- go in the cmd directory of hello world project and then compile the program by opening a terminal or command prompt, navigating to the directory where you saved the HelloWorld.bat file.
- Run the program by typing HelloWorld2, this is not case sensitive so you can type “helloworld2”, “HelloWorld2” or “HeLlOwOrLd2” result are the same. then the program should output Hello, World! and wait until you press a key for exit.
- Alternatively, you can run the program by double-clicking the HelloWorld2.bat file. This should also output will display each character of the message Hello,World! and wait until you press a key for exit.
Running with a test
- open a command prompt or terminal
- go in the cmd directory of hello world project and then compile the program by opening a terminal or command prompt, navigating to the directory where you saved the test.bat file.
- Run the program by typing test, this is not case sensitive so you can type “test”, “Test” or “TEST” result are the same. then the program should check is the result of the program is equal to the expected result, wait input to proceed and print the result of the test.
- Alternatively, you can run the program by double-clicking the test.bat file. This should also output will display the result of the test.
- NOTE: the test is a simple test, it is not a unit test, it is a simple test to check if the result of the program is equal to the expected result.
test
tasks
Contributing
Feel free to contribute your own “Hello World” programs to this repository. Simply create a new directory with the name of the programming language and add a file named hello-world. with your implementation. Don't forget to update the README file to include your contribution!
Contributors
- Silvio Torre (silviotorre) - creator, maintainer
License
- This project is licensed under the MIT License - see the MIT file for details
References
Home of this project
Enjoy and happy coding!