Results 1 to 4 of 4

Thread: Shell Scripts

  1. #1
    Join Date
    May 2007
    Location
    UK
    Beans
    8
    Distro
    Ubuntu 9.10 Karmic Koala

    Question Shell Scripts

    Hey Guys,

    Just been reading up on terminal commands and as a practice/tester wrote myself a very simple shell script to automatically update my anti virus definitions. I know the script works because i can manually execute it however i want to acheive 2 things;

    1. At the moment i still have to use chmod to be able to run the script is there a way of making this a permanent alteration?

    2. Ideally i want the script to run every time i boot, is this possible?

    Many thanks for an help,

  2. #2
    Join Date
    Apr 2008
    Location
    Phoenix, AZ
    Beans
    1,393
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Shell Scripts

    I'm not sure what you mean about chmod. Once you have altered the permissions with chmod they are usually permanent until you change them again. Where is this script located?

    You can use cron to schedule the running of the script.

    https://help.ubuntu.com/community/CronHowto

  3. #3
    Join Date
    Apr 2008
    Location
    Ohio
    Beans
    202

    Re: Shell Scripts

    For the first, right click, Properties, Permissions and check the box.

    For the second, System->Preferences->Sessions and add your script in there.

  4. #4
    Join Date
    Apr 2008
    Location
    Phoenix, AZ
    Beans
    1,393
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Shell Scripts

    If you only need to have it run when you log in, sessions would work. If it needs to run while the computer is on, whether or not you are actually logged in, crontab is the way to go.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •