11

Loading a tar file into the shell script

view full story
linux-howto

http://www.unix.com – Hi All, I am trying to write a shell script in which the contents of a small tar file is loaded into a variable and the same variable contents is moved into another file and finally untaring of the newly created file is done. The Shell Script is as follows: Code: #----Start Of The Script------ File_Load=`cat -v sample.tar.gz` echo "$File_Load" > New_Sample.tar.gz tar -xvf New_Sample.tar.gz #----End Of The Script-------- When i execute the above scritpt, it creates New_Sample.tar.gz, but untaring is failing is with below error: Code: tar: This does not look like a (HowTos)