LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-30-2002, 02:52 AM   #1
nautilus_1987
Member
 
Registered: Aug 2002
Distribution: Slackware 8.1
Posts: 750

Rep: Reputation: 30
Lightbulb shell scripts


Hi there!

I am interested in bash programming so, for example I write( in pico ):

#!/bin/bash
echo Hello World

Then I save file like: .hello.sh or hello.sh
I want to execute it: ./hello.sh
But some error appears

Any suggestions?

thanks in advance!
 
Old 08-30-2002, 03:12 AM   #2
MartBrooks
Member
 
Registered: May 2002
Location: London
Distribution: Debian
Posts: 388

Rep: Reputation: 31
The haven't set the executable bit on the file.

chmod +x ./hello.sh

Regards
 
Old 08-30-2002, 04:03 AM   #3
yixudong
LQ Newbie
 
Registered: Aug 2002
Location: Somewhere in East World
Distribution: RH7.x
Posts: 11

Rep: Reputation: 0
Arrow How can you execute a text file?

You should change the mode of the file.

chmod 711 filename or
chmod a+x filename

then ./filename

You'll be success.

Good luck and be fun in coding shell script
 
Old 08-30-2002, 04:12 AM   #4
nautilus_1987
Member
 
Registered: Aug 2002
Distribution: Slackware 8.1
Posts: 750

Original Poster
Rep: Reputation: 30
Thanks guys, it works!!!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help with shell scripts thorney Linux - Newbie 4 11-28-2005 12:18 AM
shell scripts rocketgo Linux - General 10 12-01-2003 06:20 AM
Shell Scripts benwy Linux - Software 1 06-09-2003 03:58 AM
Shell scripts anon227 Linux - Software 1 01-03-2003 04:11 PM
shell scripts gui10 Programming 10 10-28-2001 03:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:11 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration