~dricottone/my-utils

ref: a7cc0789ece21cd9833667e09d278dae392d8220 my-utils/archives/test_init.sh -rwxr-xr-x 591 bytes
a7cc0789Dominic Ricottone whiched and whichvi now respect the quiet option 2 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh

# create and move into temp directory
mkdir test/
cd test/

# compression target
printf "[1]\n[2]\n[3]\n\n" > compression_target.txt

# decompression targets
printf "(a)\n(b)\n(c)\n\n" > decompression_result.txt
tar -cf decompression_target.tar decompression_result.txt
tar -czf decompression_target.tar.gz decompression_result.txt
tar -cJf decompression_target.tar.xz decompression_result.txt
tar --zstd -cf decompression_target.tar.zst decompression_result.txt
tar -cjf decompression_target.tar.bz2 decompression_result.txt
mv decompression_result.txt decompression_target.txt