Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Jun 2006
    Location
    UK
    Posts
    892
    Thanks
    301
    Thanked 2 Times in 2 Posts

    Question Linux Ubuntu - Creating auto executing script

    Hi

    I come from a windows background and in windows there was .bat files that could run commands automatically. Now since I have swiched to linux (Ubuntu) i beilieve it does not support .bat files, so I was wondering can someone please help me create a script which when run, will do the following:

    1. Run Command:
    Code:
    sudo ntpdate ntp.ubuntu.com pool.ntp.org
    2. Automatically enter the system password:
    Code:
    helloworld

    Thanks for any help.

  • #2
    New Coder
    Join Date
    Nov 2013
    Location
    Lahore
    Posts
    30
    Thanks
    2
    Thanked 3 Times in 3 Posts
    a .bat file is specifically a windows scripting file that usually calls windows applications within the .bat file. You should be able to open the bat file in any text editor and see what applications it calls to but you won't be able to run that on a Linux machine.

    There is a slight chance that you could get the game to run using WINE, http://www.winehq.org/ but a game that uses batch files like that I would say you have a very slim chance.

  • Users who have thanked thefasninja for this post:

    phantom007 (12-24-2013)


  •  

    Posting Permissions

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