Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > fr.comp.os.unix > #8038

Re: basename

From Olivier Miakinen <om+news@miakinen.net>
Newsgroups fr.comp.os.unix
Subject Re: basename
Date 2022-10-01 15:52 +0200
Organization There's no cabale
Message-ID <th9gm1$o95$1@cabale.usenet-fr.net> (permalink)
References <63350177$0$25835$426a74cc@news.free.fr> <th9dma$p4e$10@shakotay.alphanet.ch>

Show all headers | View raw


Le 01/10/2022 à 15:00, Jo Engo a écrit :
> 
>> pour vous, qu'est-ce que c'est qu'un "basename" ?
> 
> Pour moi c'est une commande :
> 
> $ basename /foo/bar/team
> team
> $ basename /toto/titi/ta.ta
> ta.ta
> 
> $ man basename
> BASENAME(1)                      User Commands                     
> BASENAME(1)
> 
> NAME
>        basename - strip directory and suffix from filenames
> 
> Apparement .ta n'est pas un suffixe, ou basenamene fait pas ce qu'il dit.

Si, .ta n'est pas un suffixe /en soi/, mais il l'est si tu le lui dis.

$ basename /toto/titi/ta.ta .ta
ta

Mais aussi :

$ basename /toto/titi/ta.ta a
ta.t
$ basename /toto/titi/ta.ta ta
ta.
$ basename /toto/titi/ta.ta a.ta
t

La notion rigide de suffixe dans MS-DOS et Windows n'existe pas en Unix.

-- 
Olivier Miakinen

Back to fr.comp.os.unix | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

basename Thomas <fantome.forums.tDeContes@free.fr.invalid> - 2022-09-29 04:22 +0200
  Re: basename Benoit Izac <use.reply.to@INVALID.ADDRESS> - 2022-09-29 07:39 +0200
  Re: basename Nicolas George <nicolas$george@salle-s.org> - 2022-09-29 09:21 +0000
    Re: basename Thomas <fantome.forums.tDeContes@free.fr.invalid> - 2022-10-01 22:44 +0200
  Re: basename Jo Engo <yl@icite.fr> - 2022-10-01 13:00 +0000
    Re: basename Jo Engo <yl@icite.fr> - 2022-10-01 13:07 +0000
    Re: basename Olivier Miakinen <om+news@miakinen.net> - 2022-10-01 15:52 +0200
      Re: basename Thomas <fantome.forums.tDeContes@free.fr.invalid> - 2022-10-01 22:58 +0200
        Re: basename Olivier Miakinen <om+news@miakinen.net> - 2022-10-01 23:12 +0200

csiph-web