Path: ...!weretis.net!feeder9.news.weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Lew Pitcher Newsgroups: comp.os.linux.misc Subject: Re: tar problem Date: Sun, 9 Jun 2024 16:01:21 -0000 (UTC) Organization: A noiseless patient Spider Lines: 39 Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Sun, 09 Jun 2024 18:01:21 +0200 (CEST) Injection-Info: dont-email.me; posting-host="b333512c8a60332dc231a0533152c853"; logging-data="3681141"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+651Zhq/Dc48eVRQlkhbo9axWMGUdV+gU=" User-Agent: Pan/0.139 (Sexual Chocolate; GIT bf56508 git://git.gnome.org/pan2) Cancel-Lock: sha1:W8U9GcZ1i5jdYmZQkTPz6MmDbr8= Bytes: 2174 On Sun, 09 Jun 2024 14:36:49 +0000, db wrote: > 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/ ? Are you certain that you are running the right tarx? What does your $PATH look like? Is there a tarx executable in any of the directories /before/ your ~/bin in your PATH? If so, what do /they/ look like? -- Lew Pitcher "In Skills We Trust"