|
tar and CSV
I want to create a database of the contents of my tarfiles. I read that I can list the contents of an archive by typing:
tar -t thisarchive.tar (or use --list instead of -t)
But, when I ran the above, my terminal just sat there silently.
I want to generate a CSV file with:
$tarfile_name,$file1_in_archive
$tarfile_name,$file2_in_archive
etc.
and then import the resulting CSV into a MySQL table that I have created.
I thought using tar -t would be a good starting place to build this kind of thing. But, even if I can figure out the -t or --list options, I have never written a shell script and don't know regular expressions, so I'm unable to implement my idea.
If anybody could give me a brief description of the basic components I will need to learn and use, then point me to more detailed (though learner-friendly!) coverage of same, I would be grateful.
Thanks!
|