I have to write a shell script that uncompresses files based on their suffix. i.e if the file is tar I would use tar -x
.. Simple enough.
So here is my script:
Code:#!/bin/sh case $1 in *.tar*) `tar -xzf $1` ;; *.zip*) `unzip $1` ;; *.z|*.gz) `gunzip $1` ;; esac [avanish@pc25 ~]$ ./third.sh testbinary.zip ./third.sh: line 7: Archive:: command not found
The file uncompresses, because I check it with an ls afterword, but why do I keep getting that error??