Paddy Landau
December 23rd, 2008, 05:35 PM
I wish to automate tar with multi-volume spanning. For that, I need a script.
The following link gives a script written in sh (using #!/bin/sh)
http://www.gnu.org/software/tar/manual/html_node/Multi_002dVolume-Archives.html#SEC156
The script works, but I need to modify this script a little. However, I'm totally unfamiliar with sh, and I'm familiar with bash. Thus, I've rewritten this in bash (using #!/bin/bash).
But...
The sh script sets TAR_FD as:
echo ${name:-$TAR_ARCHIVE}-$TAR_VOLUME >&$TAR_FDThe equivalent in bash, I thought, was:
TAR_FD=${NEWNAME}(where ${NEWNAME} contains the new name)
However, tar doesn't receive this new name and continues to reuse the old name.
I've also tried
export TAR_FD=${NEWNAME}without success.
How do I return TAR_FD back to tar?
Thanks.
The following link gives a script written in sh (using #!/bin/sh)
http://www.gnu.org/software/tar/manual/html_node/Multi_002dVolume-Archives.html#SEC156
The script works, but I need to modify this script a little. However, I'm totally unfamiliar with sh, and I'm familiar with bash. Thus, I've rewritten this in bash (using #!/bin/bash).
But...
The sh script sets TAR_FD as:
echo ${name:-$TAR_ARCHIVE}-$TAR_VOLUME >&$TAR_FDThe equivalent in bash, I thought, was:
TAR_FD=${NEWNAME}(where ${NEWNAME} contains the new name)
However, tar doesn't receive this new name and continues to reuse the old name.
I've also tried
export TAR_FD=${NEWNAME}without success.
How do I return TAR_FD back to tar?
Thanks.