Sujet : Re: tar problem
De : fritz (at) *nospam* spamexpire-202406.rodent.frell.theremailer.net (Fritz Wuehler)
Groupes : comp.os.linux.miscDate : 10. Jun 2024, 01:29:25
Autres entêtes
Organisation : dizum.com - The Internet Problem Provider
Message-ID : <5410f8ada88f68a2209418243114e08b@msgid.frell.theremailer.net>
References : 1
db <
dieterhansbr...@gmail.com> [d]:
d> Why doesn't it work from bin/ ?
First check whether ~/bin is part of your $PATH environment
variable:
$ echo "$PATH" | tr : '\n' | grep "$HOME"/bin | grep . && echo OK
Then check whether the script has its execute bit set:
$ find "$HOME/bin/tarx" -perm /u+x | grep . && echo OK
Then replace the contents of your script with the following
more resilient version:
#!/bin/sh
[ -r "$1".tar.gz ] && tar -xf "$1".tar.gz