LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 12-08-2005, 07:30 AM   #1
Jacky Quah
LQ Newbie
 
Registered: May 2005
Posts: 28

Rep: Reputation: 15
Question Linux Script


Hi, I new to linux, and this is my first time create bash script.

I wonder why I doesn't works. it's said I don't have permission.
when I used debug mode to run the script it can create/decompressed a single directory or file.

Note : I run the script as root user(Super user).
Code:
#!/bash/bin
clear
echo "Testing script 1."
mkdir $LFS/SRC
cd $LFS/SRC
echo "#decompressed bintutils-2.15.94.0.2.2 Packages"
`bzip2 -dc /sources/binutils-2.15.94.0.2.2.tar.bz2 | tar xvf -`
cd binutils-2.15.94.0.2.2
`patch -Np1 -i /sources/binutils-2.15.94.0.2.2-gcc4-1.patch`
mkdir ../binutils-build
cd ../binutils-build
../binutils-2.15.94.0.2.2/configure --prefix=/tools --disable-nls
make
make install
make -C ld clean
make -C ld LIB_PATH=/tools/lib
 
Old 12-08-2005, 07:41 AM   #2
fatrandy13
Member
 
Registered: Jun 2004
Location: new jersey
Distribution: anything debian based, long live apt-get
Posts: 230

Rep: Reputation: 30
in the directory the script is in type:

chmod +x scriptname.sh

this makes it executable.....or try:

chmod 777 scriptname.sh

this makes it executable for everyone
 
Old 12-08-2005, 07:44 AM   #3
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
did you test the value stored in $LFS ?
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
same awk script running on linux 7.2 and linux 10 suchi_s Programming 2 11-22-2004 07:47 AM
linux script kjsubbu Linux - Networking 8 10-15-2004 02:00 AM
Converting a Windows Perl script to a Linux Perl script. rubbercash Programming 2 07-19-2004 10:22 AM
linux 9 and java script error - premature end of script header sibil Linux - Newbie 0 01-06-2004 04:21 PM
Exp. Windows/Linux-Script Programmer - Need Linux Programming Mentor! ruttiger Linux - Newbie 2 10-28-2001 11:00 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:06 AM.

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