Find the answer to your Linux question:
Page 2 of 3 FirstFirst 1 2 3 LastLast
Results 11 to 20 of 24
yeah X.Cyclop that would be ok if i would just know java........
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #11
    Banned jan1024188's Avatar
    Join Date
    Jul 2006
    Location
    EU, SLOVENIA
    Posts
    1,549

    yeah X.Cyclop that would be ok if i would just know java.....

  2. #12
    Linux Guru Cabhan's Avatar
    Join Date
    Jan 2005
    Location
    Seattle, WA, USA
    Posts
    3,252
    See, here's the thing. Most Windows users don't have Python or Perl installed on their machines. Every Windows user can run the following files:
    - A Batch script (Batch is the DOS scripting language)
    - An executable compiled for MS-32 systems

    99% of Windows users can also run Java, since so many websites and applications use it.

    Having no experience with Batch or Java, do you know C or C++? So long as you use only standard libraries, C and C++ are 100% portable. You would need to compile it on a Windows machine, but it would work.

  3. #13
    Banned jan1024188's Avatar
    Join Date
    Jul 2006
    Location
    EU, SLOVENIA
    Posts
    1,549
    no i dont know C or C++...i started with lealning programming languages last week.....

  4. #14
    Banned jan1024188's Avatar
    Join Date
    Jul 2006
    Location
    EU, SLOVENIA
    Posts
    1,549
    anyway no more help needed...im to big noob.....

  5. #15
    Linux Guru bigtomrodney's Avatar
    Join Date
    Nov 2004
    Location
    Ireland
    Posts
    6,133
    You have quite a simple file - in this case all you need to do is
    • Remove the shabang (#!/bin/bash)
    • Replace 'clear' with 'cls'
    • Save it in a file ending with .bat or .cmd


    Of course I normally would dissapprove of such scripts....but it's obviously just a prank and I have been known to play a few of those

    By the way, if you want to add some beeps to the script in windows/dos, use this code
    Code:
    echo echo ^g >> script.bat
    That's control-G if you didn't recognise it - anyway, you will see a blank character added to the script, just copy it and paste it with the echo command where you want it. You should get a system beep from the motherboard speaker.

  6. #16
    Banned jan1024188's Avatar
    Join Date
    Jul 2006
    Location
    EU, SLOVENIA
    Posts
    1,549
    thank you bigtomrodney
    thet realy helps

  7. #17
    Linux Guru bigtomrodney's Avatar
    Join Date
    Nov 2004
    Location
    Ireland
    Posts
    6,133
    I forgo to mention - '#' is not a comment mark in windows/dos. You need to use 'REM', though there is a placeholder ':'

    Usually you would type
    Code:
    :Start
    echo Some message
    ::the goto will return to 'start', also note the case-insensitivity
    ::the double colon is treated as a comment as it is an uninterpretable placeholder
    ::especially when used mulitple times
    goto start

  8. #18
    Banned jan1024188's Avatar
    Join Date
    Jul 2006
    Location
    EU, SLOVENIA
    Posts
    1,549
    yes i have alredy deleted it -comment
    anyway thanks again...that realy works..

  9. #19
    Linux User
    Join Date
    Aug 2006
    Posts
    458
    Quote Originally Posted by X.Cyclop
    Oh, ok.


    I think Java would be a nice choice, because anyone has JVM installed on his machine.
    With Perl/Python you'll need an interpreter.
    So what is a JVM? it's does what an interpreter does, its runs the code. If you can install a JVM, you can also install an interpreter.

  10. #20
    Linux User
    Join Date
    Aug 2006
    Posts
    458
    Quote Originally Posted by Cabhan
    See, here's the thing. Most Windows users don't have Python or Perl installed on their machines. Every Windows user can run the following files:
    - A Batch script (Batch is the DOS scripting language)
    - An executable compiled for MS-32 systems

    99% of Windows users can also run Java, since so many websites and applications use it.

    Having no experience with Batch or Java, do you know C or C++? So long as you use only standard libraries, C and C++ are 100% portable. You would need to compile it on a Windows machine, but it would work.
    Its just a matter of downloading and installing. Java JVMs/SDKs are downloaded too ...

    you can program quick batches with DOS, but when it comes to tasks like text manipulation,date/time , etc , DOS loses that capability. Although you can program it in DOS, but it takes a lot of code to do that. It also depends whether the coder has the time to do that or not.

    Java, yes, it is a language for the web, but not for batching or scripting. Not saying Java cannot be used for scripting tasks, but how much code does it need just to print out "hello world" , which you can do it simply in perl/python/batch like this : print "hello world"?? echo hello world ?

    C/C++: you need a compiler .. it's not compile once , use anywhere (correct me if i am wrong) and unless you are doing game programming involving graphics, writing device drivers, low level interfacing etc, i would say C/C++ is not really the best tool if you want to do scripting or batching.

Page 2 of 3 FirstFirst 1 2 3 LastLast

Posting Permissions

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