LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 12-17-2004, 01:33 PM   #1
caps_phisto
Member
 
Registered: Sep 2004
Location: NH
Distribution: FC6, FC1-4, RH9, Gentoo 2006.0/1, Slackware 10.1/2,11, Vector SOHO 5.0.1
Posts: 237

Rep: Reputation: 30
Extracting BINs


I have a problem concerning a extracting a BIN using a script. I have followed the instructions found here: http://java.sun.com/products/archive...all-linux.html
for installing the Self-Extracting file.

My script looks like this: (well a small part anyway, the whole thing is around 220 lines)
Code:
cp j2sdk-1_4_2_06-linux-i586.bin /usr/java
/usr/java/./j2sdk-1_4_2_06-linux-i586.bin
When I do these commands manually the bin extracts in /usr/java. But when I execute this script the files are extracted to where ever my script is. For example if I run the script in my home directory the files are extracted there instead of /usr/java.

Is there anyway I can force it to extract to the correct directory without changing directories in my script?

Thanks in advance.
 
Old 12-17-2004, 07:46 PM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
I believe there is a simple way.

Quote:
cp j2sdk-1_4_2_06-linux-i586.bin /usr/java /usr/java/./j2sdk-1_4_2_06-linux-i586.bin
insert the command 'cd /usr/java' between the two lines of code, like this:

cp j2sdk-1_4_2_06-linux-i586.bin /usr/java
cd /usr/java
/usr/java/./j2sdk-1_4_2_06-linux-i586.bin

bash should then change to /usr/java before executing the last line.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems installing from RPMS and BINs dannysalerno Linux - Software 10 05-14-2005 02:43 AM
mounting image files (iso, bins, etc) minm Linux - Newbie 1 09-08-2004 01:14 PM
cgi-bins and fill out forms sachitha Programming 4 03-22-2004 02:44 AM
installing .bins endezeichen Linux - General 1 12-20-2003 12:47 PM
open office and .bins dsc1596 Linux - Software 2 10-02-2002 10:13 PM

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

All times are GMT -5. The time now is 04:43 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