Hello this is my first time using this forum. And I hope to one day be able to to be in this section assisting others.
I have a simple question and it is regaurding the running the shell script. I made a simple test script to go to the Documents directory and then ping
www.yahoo.com. Now I know that I am using bash of course and once the script runs i get a error which shows
Code:
./a-ping.sh: line 1: !#/bin/bash: No such file or directory
PING www.yahoo.com (209.191.122.70) 56(84) bytes of data.
64 bytes from ir1.fp.vip.mud.yahoo.com (209.191.122.70): icmp_req=1 ttl=52 time=52.1 ms
64 bytes from ir1.fp.vip.mud.yahoo.com (209.191.122.70): icmp_req=2 ttl=52 time=51.6 ms
64 bytes from ir1.fp.vip.mud.yahoo.com (209.191.122.70): icmp_req=3 ttl=52 time=51.6 ms
64 bytes from ir1.fp.vip.mud.yahoo.com (209.191.122.70): icmp_req=4 ttl=52 time=49.9 ms
--- www.yahoo.com ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 15249ms
rtt min/avg/max/mdev = 49.983/51.368/52.163/0.840 ms
So here is the issue i know that !#/bin/bash has to be included in the first line of the script right? But when I run the script I get this error:
Code:
./a-ping.sh: line 1: !#/bin/bash: No such file or directory
And yet the script executes as it should. And I have confirmed that 'bash' is in the ./bin subdirectory. May I get an explanation? Dose this message really matters? If so then I would like to know how, and what is the best solution to the problem. I would love to be enlightened on this. Thank you.