Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )

Advanced DNS Management
New ZoneEdit. New Managment.


Sign Up Now
Reply to this topicStart new topic
> help with script
post 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


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.


while true
echo "$(date)" |tee -a mylog1
echo "meeting at"; date '+%H:%M'
sleep 5


I recently added home/cs2165/cs216523 because I thought that was need to run my script from that location.
Please help.
Go to the top of the page
+Quote Post
post Apr 1 2012, 04:33 PM
Post #2

Its GNU/

Group: Support Specialist
Posts: 1,726
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.
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:


RSS Lo-Fi Version Time is now: 10th October 2015 - 05:52 AM