The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 09-25-2007
Hyunkel Hyunkel is offline
Registered User
 

Join Date: Sep 2007
Posts: 4
How to create an run a simple batch file?

Hi,
So, I created a file named TEST.BAT in my home directory.

In it, I wrote:


#! /bin/bash
echo Hello


and then, saved the file.


Then, at the command-line interface, I typed TEST.BAT, but the command-line never executes the file and thus, never returns "Hello". It says "command not found".

I tried various combinaisons, such as TEST, 'TEST', "TEST", 'TEST.BAT' and "TEST.BAT". I also put "exec" in front of all these commands...but it still says "command not found".

Any help?
Reply With Quote
Forum Sponsor