Added -o path parameter to specify a custom destination/name for the output file.
Applies -k and only applies if -c is not used.
If the parameter points to a directory it uses the current naming method.
If the parameter points to a new file uses it as a custom name.
Compression examples
# Will output at ./custom_name.tar.sz
snzip -o custom_name.tar.sz archive.tar
# Will output at /some/path/archive.tar.sz
snzip -o /some/path archive.tar
# Will output at /some/path/custom_name.tsz
snzip -o /some/path/custom_name.tsz archive.tar
# Will output at /some/path/no_extension_file
snzip -o /some/path/no_extension_file archive.tar
Uncompression examples
# Will output at ./custom_name.txt
snzip -d -o custom_name.txt archive.txt.sz
# Will output at /some/path/archive.txt
snzip -d -o /some/path archive.txt.sz
# Will output at /some/path/custom_name.txt
snzip -d -o /some/path/custom_name.txt archive.txt.sz
# Will output at /some/path/no_extension_file
snzip -d -o /some/path/no_extension_file archive.txt.sz
Added
-o path
parameter to specify a custom destination/name for the output file.-k
and only applies if-c
is not used.Compression examples
Uncompression examples