mirror of
https://github.com/ellysh/bash-programming-from-scratch.git
synced 2026-01-26 07:43:42 +00:00
23 lines
277 B
Bash
23 lines
277 B
Bash
#!/bin/bash
|
|
|
|
operation="$1"
|
|
|
|
case "$operation" in
|
|
"-a")
|
|
bsdtar -c -f documents.tar ~/Documents
|
|
;;
|
|
|
|
"-c")
|
|
bsdtar -c -j -f documents.tar.bz2 ~/Documents
|
|
;;
|
|
|
|
"-x")
|
|
bsdtar -x -f documents.tar*
|
|
;;
|
|
|
|
*)
|
|
echo "Invalid option"
|
|
exit 1
|
|
;;
|
|
esac
|