Problems trying to extract gzipped archives from script
ose.tar.gz: command not found
build.tar.gz: command not found how to overcome this error? I am totally new to linux. |
Those are data files, not cmds.
What exactly are you trying to do? You should read this http://rute.2038bug.com/index.html.gz Can you tells us the name of your Linux version? Please post the results of Code:
cat /etc/*release* |
These are archived files (or a collection of zipped files). Tar stands for tape archive and gz for gzip.
These files were created as: Code:
~$ tar -cvf ose.tar /path/to/source Code:
~$ tar -ztvf ose.tar.gz Code:
~$ tar -zxvf ose.tar.gz |
Thanku
Thanku for the reply
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? Thanku |
Code:
$ var=/home/cdot 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 Code:
/home/cdot |
Thanku
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 |
Do you want to replace /home/cdot/ string with some variable...?
Code:
~$ sed -e 's/\/home\/cdot/<some_value>/g' infile.txt |
Probably best if you show us the script and be clear on what you want to see before and after.
|
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 mkdir $ROOT/core/UCA/release/lib mkdir $ROOT/core/UCA/release/lib/i686-pc-linux_dbg.GNU3_4_4 $ROOT/core/OpenSDF/SDF/SDF_SchemaCompiler/src/SDF_Schema.cc cd $ROOT/core/OpenSDF export INSTALL_ROOT=$ROOT/core/OpenSDF export PROJECT_PATH=$ROOT/core/OpenSDF cd $ROOT/core/Common cd $ROOT/core/CASGCommon export INSTALL_ROOT=$ROOT/core/CASGCommon ln -s dotproject.project cd $ROOT/core/UCA export INSTALL_ROOT=$ROOT/core/UCA ln -s dotproject.project grep /home/cdot/c4 ---------- Post added 03-05-13 at 02:12 PM ---------- Thanku shivaa |
No need to use any other variable. The $HOME in-build variable is enough to hold /home/cdot directory.
Else you can do following in your script: Code:
VAR="/home/cdot/c4" Code:
cat $VAR/foo.txt Code:
~$ gawk '{gsub(/\/home\/cdot\/c4/,"\$VAR",$0); print $0}' myscript.sh |
Can you please suggest me some link or book for studying an practicing the scripts..
Thanku |
Best reference books are here.
Please Mark the thread as solved, if you think it has so (option is under Thread Tools on top menu). |
|
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?
Thanku. |
All times are GMT -5. The time now is 06:15 PM. |