Deutsch   English   Français   Italiano  
<v44em0$3i8j8$1@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!news.nobody.at!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: db <dieterhansbritz@gmail.com>
Newsgroups: comp.os.linux.misc
Subject: tar problem
Date: Sun, 9 Jun 2024 14:36:49 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 28
Message-ID: <v44em0$3i8j8$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 09 Jun 2024 16:36:49 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="b236468cdbfaee0f48e2f1d7ef35d671";
	logging-data="3744360"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1/bXhyIjjk2TvT1KpohKPUwLFq/MvMtAmo="
User-Agent: Pan/0.149 (Bellevue; 4c157ba)
Cancel-Lock: sha1:FWS6kVK1j/3Fhrcx6BM0rJkPzcA=
Bytes: 1679

I like to make life easy so I wrote a one-line script
for extracting the contents of a tar file. I copied it
into the /bin directory so I can run it from anywhere.
I tried it out in a test directory where I had it, and
where there is a small test tar file. Here is the dialogue
from running it, using  both the local script and the one
in /bin:

~/tartest> ls
tarx  test.tar.gz
~/tartest> cat tarx
tar -xf $1.tar.gz
~/tartest> cat ~/bin/tarx
tar -xf $1.tar.gz
~/tartest> ./tarx test
~/tartest> ls
tarx  test  test.tar.gz
~/tartest> del -r test
~/tartest> tarx test
tar (child): test: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now

Why doesn't it work from bin/ ?

-- 
db