The DNS Guys |
Anycast DNS 25 Nameservers Worldwide |
DNS Failover Host Monitoring & Auto Rollback |
Outbound SMTP Smart Relay, SASL |
| Subversion Hosting OpenID Servers & XMPP |
DNSSEC TSIG & Secondary DNS |
easyRoute53 Amazon Route53 GUI |
![]() ![]() |
Apr 1 2012, 01:22 PM
Post
#1
|
|
|
Whats this Lie-nix Thing? ![]() Group: Members Posts: 2 Joined: 27-March 12 Member No.: 17,510 |
Hi,
I am very new to linux and I can't figure out why my script cannot run from a different file location. I think I am missing something in my script, but I am not sure. Here is what I have so far. #!/bin/bash/home/cs2165/cs216523 while true do echo "$(date)" |tee -a mylog1 echo "meeting at"; date '+%H:%M' sleep 5 done I recently added home/cs2165/cs216523 because I thought that was need to run my script from that location. Please help. |
|
|
|
Apr 1 2012, 04:33 PM
Post
#2
|
|
|
Its GNU/Linuxhelp.net ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Support Specialist Posts: 1,628 Joined: 23-January 03 Member No.: 360 |
#!/bin/bash tells the terminal what interpreter to use.
If the directory where mylog is located is not in your path environment then the script will not work. You can add a statement to change to the directory like cd /location/of/mylog1 before the while. Be sure to use the actual path. |
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 22nd May 2013 - 05:55 AM |