how to run a command in terminal at startup?

Discussion in 'Mac Programming' started by phuong, Jan 21, 2008.

  1. phuong macrumors 6502a

    Joined:
    Aug 16, 2006
    #1
    hello. I want to run the following sequence of command in the terminal at startup:
    Code:
    cd mytest
    ./init.bat
    is it possible to do it? and if yes, please tell me how.

    thnk you very much
     
  2. HiRez macrumors 603

    HiRez

    Joined:
    Jan 6, 2004
    Location:
    Western US
    #2
    Yes, it is possible:

    http://www.osxfaq.com/Tutorials/LearningCenter/HowTo/Startup/index.ws

    It's a little complicated to set it up, but it's not that bad really if you carefully follow the example. I think things might easier if you can run it at login time instead of startup time (it wouldn't need to have root privileges). But you'd have to set it up separately for each user who needs it in that case.
     
  3. satyam90 macrumors regular

    satyam90

    Joined:
    Jul 30, 2007
    Location:
    Bangalore, India
    #3
    If u want something to run everytime u start terminal (and not at system startup) do the following:

    Create a ".profile" file in ur HOME directory. ".profile" must consist of the commands that u want to run at terminal start up.


    ###################################################
    That's it. Everytime, u start a terminal, the commands in ".profile" will run
    Try it out.
     

Share This Page