Hi all,
First of all, apologises for main topic, but I'm not able to change its name.
I'm writting a script in bash with some functions and it doesn't work properly.
For example, which is what happens:
Code:
compFunct(){
$1 $3.$2 $4
}
#main
vDest="/tmp/export/file"
vOrig="/tmp/export/filedest"
echo "Compression method: "
read vCompression
case $vCompression in
zip)
vFormat="zip"
;;
tar.gz)
vFormat="tar -czvf"
;;
*)
echo "Unknown compression format"
;;
esac
compFunct $vFormat $vCompression $vDest $vOrig
For the first case it works, but not for the second. I think there migh be any problem with the space or cause these are options, but I don't know.
Errormessg:
Code:
tar -czvf: command not found
Any clues?
Thanks,
Eudald