LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 11-17-2003, 06:05 PM   #1
pengStudent
Member
 
Registered: Nov 2003
Location: California
Distribution: Slackware 14
Posts: 55

Rep: Reputation: 15
bash scripting and tar


Hi, I was wondering if the following is possible, I have a regular text file that contains paths to directories:

ex.
/home/user/dir1/file1
/home/user/dir1/dir2/file2
/home/user/dir8/file3

Thats how the text file looks and I want to be able to pass them to tar so it creates an archive with full paths. Sound possible with shell script, or should I use perl or python? Thanks for the help.
 
Old 11-17-2003, 06:33 PM   #2
leonscape
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313

Rep: Reputation: 48
This should be very straight forward with a script. Heres a manual for bash scripting. Pay attention too arrays, and string processing. I'd knock one up for you, but I'm a little rusty and would probably take as long to work it out
 
Old 11-17-2003, 07:09 PM   #3
pengStudent
Member
 
Registered: Nov 2003
Location: California
Distribution: Slackware 14
Posts: 55

Original Poster
Rep: Reputation: 15
Thanks, just wanted to make sure. Im new to linux so I wasnt sure. Thanks.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
BASH Scripting akilles Linux - Newbie 5 11-10-2004 07:26 PM
bash scripting qu drigz Programming 12 06-15-2004 02:09 AM
BASH Scripting ? eroica Programming 3 06-07-2004 07:51 PM
Bash scripting JonCooperUK Programming 3 03-04-2004 08:55 PM
About bash scripting pazvant Programming 3 10-20-2003 11:12 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

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