Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: db Newsgroups: comp.os.linux.misc Subject: Re: tar problem Date: Fri, 14 Jun 2024 14:35:02 -0000 (UTC) Organization: A noiseless patient Spider Lines: 25 Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Fri, 14 Jun 2024 16:35:02 +0200 (CEST) Injection-Info: dont-email.me; posting-host="b1c9aa02c91168da0c646a5f0ed1a0d3"; logging-data="3084928"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+FlHcp5jZT2ton9mKYcqy8fwNMwSW0bCY=" User-Agent: Pan/0.149 (Bellevue; 4c157ba) Cancel-Lock: sha1:QEf/tsguOxZInOVmmAebwDJkwYg= Bytes: 1974 On Sun, 9 Jun 2024 14:36:49 -0000 (UTC), 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/ ? Red face time. I just found out that I have an alias called tarx in my .bashrc. In fact, someone asked me about this and I answered in the negative, without checking. My apologies! -- db