[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: how execute a script



On Tue 17 Nov 2015 at 21:41:01 +0100, Luis Felipe Tabera Alonso wrote:

> On Tuesday 17 November 2015 20:21:23 Brian wrote:
> > 
> > I've also asked for a *concrete example* of a program not opening a file
> > because of the lack of an extension. It hasn't yet been given.
> 
> $ gunzip file 
> gzip: file: unknown suffix -- ignored

That is a good example.

  brian@desktop:~$ cp /etc/services test
  brian@desktop:~$ file test
  test: ASCII text

  brian@desktop:~$ gzip test

  brian@desktop:~$ file test.gz 
  test.gz: gzip compressed data, was "test", last modified: Tue Nov 17 21:49:33 2015, from Unix

  brian@desktop:~$ mv test.gz test-1

test-1 has no extension. Does gzip have two personalities? :)

  brian@desktop:~$ gunzip < test-1 > test-2

  brian@desktop:~$ file test-2 
  test-2: ASCII text

Interesting. gunzip will decompress a file without an extension. Does it
have two personalities? :)

Alternatively:

  zcat test-1 > test-2 

> $mv file other.gz
> $gunzip other.gz 
> $ls
> other

  $mv file other.
  $gunzip -S . other.
  $ls
  other

gunzip is a tool that does seem to care what the files are named.


Reply to: