LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-14-2003, 06:14 PM   #1
hoffman
Member
 
Registered: Nov 2003
Location: Georgia
Distribution: Redhat 9
Posts: 43

Rep: Reputation: 15
installing shell script


I have a couple of shell script programs and I have no idea how to run/install them. I'm searching now but all I can find is how to run RPM files.
thanks
 
Old 11-14-2003, 06:18 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
You open a terminal
You cd to the directory where the scripts are
you type
./<name of file to run><ENTER>


Cheers,
Tink
 
Old 11-14-2003, 06:21 PM   #3
TheOther1
Member
 
Registered: Feb 2003
Location: Atlanta, GA
Distribution: RHAS 2.1, RHEL3, RHEL4, SLES 8.3, SLES 9, SLES9_64, SuSE 9.3 Pro, Ubuntu, Gentoo
Posts: 335

Rep: Reputation: 32
Shell scripts (typically) require no installation. They are like .bat files in the DOS/WinDoze world. Tinkster showed you how to run them
 
Old 11-14-2003, 06:37 PM   #4
hoffman
Member
 
Registered: Nov 2003
Location: Georgia
Distribution: Redhat 9
Posts: 43

Original Poster
Rep: Reputation: 15
How do I "cd to it"? I tried a search but "cd" makes a lot of hits...
 
Old 11-14-2003, 07:21 PM   #5
hoffman
Member
 
Registered: Nov 2003
Location: Georgia
Distribution: Redhat 9
Posts: 43

Original Poster
Rep: Reputation: 15
did this:
[hoffman@alltel hoffman]$ cd
[hoffman@alltel hoffman]$ mkdir bin
[hoffman@alltel hoffman]$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/hoffman/bin
[hoffman@alltel hoffman]$ cd bin
[hoffman@alltel bin]$ ./limewirelinux
bash: ./limewirelinux: No such file or directory
[hoffman@alltel bin]$ ./home/hoffman/limewirelinux
bash: ./home/hoffman/limewirelinux: No such file or directory

It changed the prompt to "bin" I noticed...
 
Old 11-14-2003, 07:48 PM   #6
Skyline
Senior Member
 
Registered: Jun 2003
Distribution: Debian/other
Posts: 2,104

Rep: Reputation: 45
edit - if youve just created bin in /home/hoffman - have you actually put the script/program into the new directory first before you try to run it?

Last edited by Skyline; 11-14-2003 at 07:55 PM.
 
Old 11-14-2003, 08:57 PM   #7
hoffman
Member
 
Registered: Nov 2003
Location: Georgia
Distribution: Redhat 9
Posts: 43

Original Poster
Rep: Reputation: 15
[hoffman@alltel hoffman]$ ls
az31_a2_eng.zip hpijs-1.5.tar.gz
bin LimeWireLinux.bin
evolution link to gtk-gnutella-0.93-1.i586.rpm
gtk-gnutella-0.93-1.i586.rpm
[hoffman@alltel hoffman]$ /evolution
bash: /evolution: No such file or directory
[hoffman@alltel hoffman]$ pwd
/home/hoffman
[hoffman@alltel hoffman]$ ls
az31_a2_eng.zip hpijs-1.5.tar.gz
bin LimeWireLinux.bin
evolution link to gtk-gnutella-0.93-1.i586.rpm
gtk-gnutella-0.93-1.i586.rpm
[hoffman@alltel hoffman]$ gtk-gnutella-0.93-1.i586.rpm
bash: gtk-gnutella-0.93-1.i586.rpm: command not found
[hoffman@alltel hoffman]$ ./gtk-gnutella-0.93-1.i586.rpm
bash: ./gtk-gnutella-0.93-1.i586.rpm: Permission denied
[hoffman@alltel hoffman]$ su-
bash: su-: command not found
[hoffman@alltel hoffman]$ su -
Password:
[root@alltel root]# /home/hoffman
-bash: /home/hoffman: is a directory
[root@alltel root]# ls
anaconda-ks.cfg install.log install.log.syslog
[root@alltel root]# $
-bash: $: command not found


I think I got there but it said "permission denied"
when I logged in as root .... well that didn't help either...
still foolin' with it.
Why is anaconda showing up???
 
Old 11-14-2003, 09:21 PM   #8
TheOther1
Member
 
Registered: Feb 2003
Location: Atlanta, GA
Distribution: RHAS 2.1, RHEL3, RHEL4, SLES 8.3, SLES 9, SLES9_64, SuSE 9.3 Pro, Ubuntu, Gentoo
Posts: 335

Rep: Reputation: 32
Quote:
[hoffman@alltel hoffman]$ /evolution
A couple of things on this command...
1) You should type ./ev[TAB] to complete the name unless you want to type all of the escape charecters.
2) That is DOT SLASH command
3) I think you are trying to run "evolution link to gtk-gnutella-0.93-1.i586.rpm", right? That is not executable! If you are trying to install an .rpm file, the proper syntax is:
rpm -ivh file_name.rpm
type man rpm at a command prompt.

4) try this at a command prompt:
su -c "rpm -ivh /path/morepath/filename.rpm"
You will be prompted for the password and it should install. You WILL need to include the quotes in that one.

Anaconda-ks.cfg showed up because you are in the /root directory and that's where it ends up after a system installation.

[root@alltel root]# /home/hoffman
That is not a command! cd /home/hoffman IS a command and would take you to the /home/hoffman directory.

What exactly is the name of the file you want to install and what directory is it in?! Find the file and type pwd to get the path and I will send you the exact command to make it work...
 
Old 11-14-2003, 09:30 PM   #9
hoffman
Member
 
Registered: Nov 2003
Location: Georgia
Distribution: Redhat 9
Posts: 43

Original Poster
Rep: Reputation: 15
Thanks. I'll work on it. Any advice on a good book that has some BASIC linux info? I have the Visual Quickpro Guide to RH9 but it doesn't seem to tell me what I want to know.
I'm pretty good at learning from examples.

It's gtk-gnutella-0.93-1.i586.rpm and it's in home/hoffman

I just want to try out p2p in linux.

Last edited by hoffman; 11-14-2003 at 09:42 PM.
 
Old 11-15-2003, 01:35 AM   #10
fyoder
Member
 
Registered: Nov 2003
Posts: 111

Rep: Reputation: 15
Basically any intro book to Linux which focuses on the command line will help. Anything which focuses on the graphical desktop will be out of date just about by the time it's published, but the command line stuff is venerable. It's also mostly all *NIX so even an intro to UNIX would help.

BTW, something else to know about shell scripts is that to run them as tink outlined they need to be executable. If you do an
ls -l <scriptname><ENTER>
and it looks like permission are rw-r--r-- then it isn't. You can make it so with
chmod 755 <scriptname><ENTER>
or bash scripts can be run with
bash <scriptname><ENTER>

Last edited by fyoder; 11-15-2003 at 01:39 AM.
 
Old 11-15-2003, 09:46 AM   #11
TheOther1
Member
 
Registered: Feb 2003
Location: Atlanta, GA
Distribution: RHAS 2.1, RHEL3, RHEL4, SLES 8.3, SLES 9, SLES9_64, SuSE 9.3 Pro, Ubuntu, Gentoo
Posts: 335

Rep: Reputation: 32
Lightbulb

Quote:
It's gtk-gnutella-0.93-1.i586.rpm and it's in home/hoffman
OK! Now we have something to work with! Open a terminal, type:
su -c "rpm -ivh /home/hoffman/gtk-gnutella-0.93-1.i586.rpm"
You will be prompted for root password and it should install. The file does not have to be in /root to install it as root.
 
Old 11-15-2003, 08:26 PM   #12
hoffman
Member
 
Registered: Nov 2003
Location: Georgia
Distribution: Redhat 9
Posts: 43

Original Poster
Rep: Reputation: 15
Thanks Other1 ! I got it running and I'm downloading some mp3's now. What does the su -c mean? I understand the rpm file but what commands did I just use?
By the way, I'm in Warner Robins, just south of Macon.
Thanks again, to everyone.
 
Old 11-15-2003, 09:52 PM   #13
TheOther1
Member
 
Registered: Feb 2003
Location: Atlanta, GA
Distribution: RHAS 2.1, RHEL3, RHEL4, SLES 8.3, SLES 9, SLES9_64, SuSE 9.3 Pro, Ubuntu, Gentoo
Posts: 335

Rep: Reputation: 32
su -c "rpm -ivh /home/hoffman/gtk-gnutella-0.93-1.i586.rpm" means as root, run "this command"

Glad you are up and running. Last time I was at WRAFB, there were mosquitoes with 1' wingspans!
 
Old 11-15-2003, 10:50 PM   #14
hoffman
Member
 
Registered: Nov 2003
Location: Georgia
Distribution: Redhat 9
Posts: 43

Original Poster
Rep: Reputation: 15
Yea, skeeters are 'bout all dead now....
Now on to making this thing play the mp3's I downloaded. I installed mpg123.2.7... but the player doesn't even start. No moving slider, nothing. I understand RH's reason for not including any mp3 code but it sure doesn't make things any easier.
 
Old 11-16-2003, 12:00 AM   #15
twilli227
Member
 
Registered: May 2003
Location: S.W. Ohio
Distribution: Ubuntu, OS X
Posts: 760

Rep: Reputation: 30
Try these 2 sites to get you started on the command line.

http://linux.org.mt/article/terminal
http://www.linuxcommand.org/
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Shell script inside shell script treotan Linux - General 4 02-19-2009 07:34 AM
Shell Scripting: Getting a pid and killing it via a shell script topcat Programming 15 10-28-2007 03:14 AM
shell script problem, want to use shell script auto update IP~! singying304 Programming 4 11-29-2005 06:32 PM
Installing JBuilder, but get error regarding Shell Script Sir Nerdalot Linux - Software 1 07-12-2005 10:21 AM
[SHELL SCRIPT] Write at the right of the shell window Creak Linux - General 2 04-02-2004 04:00 PM


All times are GMT -5. The time now is 02:11 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration