Welcome to Linux Forums! With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.
Find the answer to your Linux question:
New to Linux Forums? Register here for free!
    Linux Forums > Your Distro > Knoppix Help Forum > Writing Scripts in Knoppix

Forgot Password?
 Knoppix Help Forum   For all discussions about Knoppix, the Linux "Live CD" that lets you run Linux without needing to install on your hard drive.

Site Navigation
Linux Articles
Linux Forums
Linux Downloads
Linux Hosting
Free Magazines
Job Board
IRC Chat
RSS Feeds


Linux Forum Topics
Linux Forums
Your Distro
Linux Resources
GNU Linux Zone
The Community
Reply
 
Thread Tools Display Modes
Old 05-11-2005   #1 (permalink)
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?
osiris_9510 is offline  


Reply With Quote
Old 05-11-2005   #2 (permalink)
Linux Guru
 
lakerdonald's Avatar
 
Join Date: Jun 2004
Location: St. Petersburg, FL
Posts: 5,039
Code:
chmod +x filename
__________________
the lost art of found sound
lakerdonald is offline   Reply With Quote
Old 05-11-2005   #3 (permalink)
Just Joined!
 
Join Date: May 2005
Posts: 4
YES..

Thank you!!!!!!!!!!
osiris_9510 is offline   Reply With Quote
Old 05-11-2005   #4 (permalink)
Linux User
 
Stefann's Avatar
 
Join Date: Nov 2004
Location: Boise, ID
Posts: 340
Send a message via ICQ to Stefann Send a message via AIM to Stefann Send a message via MSN to Stefann
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.
Stefann is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Free Magazines
Run Your Own Web Server Using Linux & Apache - Free 191 Page Preview
Learn about everything you'll need to build and maintain your Linux servers, and to deploy Web applications to them.
subscribe
Open Source Security Myths Dispelled
Dispel the five major myths surrounding Open Source Security and gain the tools necessary to make a truly informed decision for your IT organization
subscribe
InformationWeek
InformationWeek is the only newsweekly you'll need to stay on top of the latest developments in information technology.
subscribe



All times are GMT. The time now is 05:55 AM.






© 2000 - 2009 - All Rights Reserved - Property of  MAS Media

Content Relevant URLs by vBSEO 3.3.0 RC2