| || |
how to tar pattern matching files in TCL environment
I need to take "tar" and "zip" files
For example, if I have files like,
Form the above list of files, I want to select only the files which starts with "abc*" and tar all these files(abc1.txt & abc2.txt) and zip it into a file (for example, abc.tar.gz).
How will I do it in TCL environment?
I am trying to use [eval exec ...] commands.
Any help in this regard is highly appreciated.
Re: how to tar pattern matching files in TCL environment
tar -cf archive.tar `ls abc*`
You can't use wildcards directly in a tar command. I suspect that might have been where you were having a problem.