Problems trying to extract gzipped archives from script
Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have another problem. I am totally new to linux. I have been given one document and in that the paths are like this i.e./home/cdot/c4/ose. My mam has asked me to replace the path i.e. /home/cdot/ with some variable. How could I do this?
where var is a variable, it could be anything.
if you call the variable using echo, the output is what you have stored in the variable, right now it is path.
Code:
$ echo $var
output
Code:
/home/cdot
You can use $var instead of /home/cdot in your script
Thanku for the reply but still its not working.
Here is the error which i am getting.
./script: line 11: /home/cdot/c4/ose/site: is a directory
./script: line 12: /home/cdot/c4/ACE_wrappers/TAO: is a directory
./script: line 13: =/home/cdot: No such file or directory
[root@hpv2k-57 c4]# pwd
/home/cdot/c4
Thanku
I have been given one code and I have been asked to grep /home/cdot/c4 path in the code. Some where in the Makefiles this path is hardcoded. I have to find those paths and document it. Then I
have to replace those path with the variable where one can specify the path from my
script. I am unable to do dis.
I have found the path and it is
OSE_ROOT=/home/cdot/c4/ose and the other path is
export OTCommon_ROOT=home/cdot/c4/core/common
I have to replace only home/cdot with the variable.
Thanku
Thanku chris
This is the kind of script. Its not the exact script
My mam has asked me to search for the path /home/cdot/c4 nd replace /home/cdot with some variable so that it could be assessed by that variable instead of the directory.
export ROOT=`pwd`
export ACE_ROOT=$ROOT/ACE_wrappers
export LD_LIBRARY_PATH=$ACE_ROOT/lib
export TAO_ROOT=$ACE_ROOT/TAO
export PATH=$PATH:/$ROOT/build
gunzip ose.tar.gz
tar -xvf ose.tar
cd $ROOT/ACE_wrappers/ace
ln -s config-linux.h config.h
cd $ROOT/ACE_wrappers/include/makeinclude
ln -s platform_linux.GNU platform_macros.GNU
cd $ROOT/dc/jobs/unix
chmod +x bldsixax
./bldsixax release
problem while replacing a directory with the variable
There are some scripts made in the path root/c4/build and in that scripts we have used the path /home/cdot/c4. So i want to replace /home/cdot path with some variable. Rightnow I am acccessing my scripts from root/c4. I want to write a script in root so dat in the scripts, home/cdot path gets replaced with that variable. How can I do that?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.