Register
It is currently Tue Oct 21, 2014 4:19 am

Embedding/extracting files in a bash script


All times are UTC - 6 hours


Post new topic Reply to topic  [ 2 posts ] 
Author Message
 PostPosted: Wed Aug 08, 2007 8:15 am   

Joined: Mon Jun 25, 2007 8:33 am
Posts: 4
Hey guys,

I have some software that is getting archived and compressed in .tar.gz. I have written a bash script that extracts the archived data, asks the user questions, and then configures the .ini file for the product. I was trying to find a way to embed that .tar.gz in my bash script. When the script is executed, it will extract the tar.gz to a /tmp directory. I have looked into it a little bit but haven't found anything. I would think that it could be done using base64 encoding. Does anyone know how to accomplish this by chance... or have any tips?

Thanks for the help!


Top
 Profile  
 PostPosted: Mon Feb 11, 2008 4:39 am   

Joined: Tue Feb 05, 2008 8:24 am
Posts: 14
bpetty wrote:
I was trying to find a way to embed that .tar.gz in my bash script. When the script is executed, it will extract the tar.gz to a /tmp directory.


You can use shar. It will create a self-extractable shell archive. You can modify the resulting script if you want to use it as an “installerâ€￾.


Top
 Profile WWW  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron


BashScripts | Promote Your Page Too
Powered by phpBB © 2011 phpBB Group
© 2003 - 2011 USA LINUX USERS GROUP