Find the answer to your Linux question:
Results 1 to 4 of 4
Okay I'm new to writing scripts,....new to Linux too but here goes.... --------------------------- #!/bin/bash # My first script echo "Hello World!" --------------------------- ..........And that's the entire contents of my script! ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    May 2005
    Posts
    4

    Writing Scripts in Knoppix


    Okay I'm new to writing scripts,....new to Linux too but here goes....

    ---------------------------

    #!/bin/bash
    # My first script

    echo "Hello World!"

    ---------------------------

    ..........And that's the entire contents of my script! haha! Anyways, when I run this from Konsole all I get is "permission denied". Is that because there's something funky goin on because its a ramdisk? eh?

  2. #2
    Linux Guru lakerdonald's Avatar
    Join Date
    Jun 2004
    Location
    St. Petersburg, FL
    Posts
    5,035
    Code:
    chmod +x filename

  3. #3
    Just Joined!
    Join Date
    May 2005
    Posts
    4
    YES..

    Thank you!!!!!!!!!!

  4. $spacer_open
    $spacer_close
  5. #4
    Linux User Stefann's Avatar
    Join Date
    Nov 2004
    Location
    Boise, ID
    Posts
    340
    The OS will read the first line of the file to determine what to execute the script with, but it won't actually execute without the Xecute bit set on the script, that's why you needed to add it, as it isn't there by default.
    Nothing is worse than ten penguins fighting over which is better, vi or emacs.
    Registered Linux User #404402
    Finally I'm back on LF after a long while.

Posting Permissions

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