Results 1 to 2 of 2
Ok I know this might be better in the n00b section and I fell like and idiot for asking but I thought I would swallow my pride and ask. When ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 01-03-2013 #1
running scripts.
Ok I know this might be better in the n00b section and I fell like and idiot for asking but I thought I would swallow my pride and ask. When I want to run a script at home I first have to tell my system what type of script I am running. If I want to run my ha.sh script I have to type:
Now when I am at work all I would have to type is:Code:bash ha.sh
And the same script will run. Why is it that I have to type bash first? How can I make it so my home computer will know what type of script I am running?Code:ha.sh
I do have this as my first line,
So I thought that would tell my system what to run.Code:#!/bin/bash
Help me please.
- 01-03-2013 #2Linux Newbie
- Join Date
- Nov 2012
- Posts
- 134
hi,
I'd feel a bit unsecure at your work, as I've been taught not to adopt this behaviour.
the usual case is to make your script executable, and call it with absolute pathor relative pathCode:/home/me/myScript
Code:./myScript


Reply With Quote
