Linux shell scripts question
Results 1 to 6 of 6

Thread: Linux shell scripts question

  1. #1
    Senior Member
    Join Date
    Oct 2001
    Posts
    385

    Linux shell scripts question

    Sorry for the rather low-level question (I'm still learning linux), but how do you run a shell script? I downloaded one to upgrade my java version for something I need to do, but clicking on it in kde does nothing, and I don't know how to run it through the shell. I'm trying to open it in RedHat Linux 7.1, and it is the one from the http link on this page:
    http://java.sun.com/Download5
    If you could help me in any way, I would really appreciate it.

    Thank you
    Preliminary operational tests were inconclusive (the dang thing blew up)

    \"Ask not what the kernel can do for you, ask what you can do for the kernel!\"

  2. #2
    Banned
    Join Date
    Oct 2001
    Posts
    1,462
    Hmmm, To run a shell script you just do a chmod 777 script name (if it is already an executable then just do a ./script name
    Just check out the Antionline FAQ for more basic commands

  3. #3
    Senior Member
    Join Date
    Oct 2001
    Posts
    385
    found the answer!
    had to type sh j2se
    thank you for the help, ac1dsp3ctrum
    Preliminary operational tests were inconclusive (the dang thing blew up)

    \"Ask not what the kernel can do for you, ask what you can do for the kernel!\"

  4. #4
    Computer Forensics
    Join Date
    Jul 2001
    Posts
    672
    Originally posted here by ac1dsp3ctrum
    Hmmm, To run a shell script you just do a chmod 777 script name (if it is already an executable then just do a ./script name
    chmod 777 will make the file world writable, which I doubt anyone wants to do, expecially if its a script that has any sort of priveledges. the best thing to do, is just chmod +x <script name> , then ./script ( as ac1d already said). or as you already found out sh will invoke the shell script.
    Antionline in a nutshell
    \"You\'re putting the fate of the world in the hands of a bunch of idiots I wouldn\'t trust with a potato gun\"

    Trust your Technolust

  5. #5
    Senior Member
    Join Date
    Nov 2001
    Posts
    1,255
    Umm, as hogfly pointed out, chmod 777 isn't a good idea. It's better to chmod it 700 if it's owned by the user who's going to run it.
    Chris Shepherd
    The Nelson-Shepherd cutoff: The point at which you realise someone is an idiot while trying to help them.
    \"Well as far as the spelling, I speak fluently both your native languages. Do you even can try spell mine ?\" -- Failed Insult
    Is your whole family retarded, or did they just catch it from you?

  6. #6
    Member
    Join Date
    Aug 2001
    Posts
    66
    Whenever you have a lot of time....try chmoding it to 111.
    Ah well...I\'m back on AntiOnline!

Posting Permissions

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