Basename

Basename

basename

La instrucción basename muestra en la salida estándar (stdout) el nombre de fichero que se le pase como primer parámetro, eliminando el prefijo del directorio que pueda contener. Si se indica un segundo parámetro y este coincide con el sufijo del fichero, también se eliminará.

La sintaxis es:

basename fich [suff]

Ejemplo

basename /camino/del/fichero/nombre.txt
nombre.txt

... donde se ve que se ha eliminado la referencia al árbol de directorios: /camino/del/fichero/

basename /camino/del/fichero/nombre.txt .txt
nombre

... donde se ve que se ha eliminado también el sufijo o extensión.txt

Véase también

Obtenido de "Basename"

Wikimedia foundation. 2010.

Игры ⚽ Нужно решить контрольную?

Mira otros diccionarios:

  • Basename — is a standard UNIX computer program, when basename is given a pathname, it will delete any prefix up to the last slash ( / ) character and return the result. basename is described in the Single UNIX Specification and is a primarily used in shell… …   Wikipedia

  • Basename — встроенная утилита unix систем, убирающая имена каталогов и суффикс из имени файла. Если суффикс задан и идентичен концу имени, то он также удаляется из имени; basename выдаёт получившееся в результате имя на стандартный вывод. Использование… …   Википедия

  • basename — встроенная утилита unix систем, убирающая имена каталогов и суффикс из имени файла. Если суффикс задан и идентичен концу имени, то он также удаляется из имени; basename выдаёт получившееся в результате имя на стандартный вывод. Содержание 1… …   Википедия

  • Basename — ist ein Unix Programm und ein Teil des POSIX Standards.[1] Es gibt den Dateinamen ohne führende Verzeichnisnamen aus. Wird ein Suffix angegeben und stimmt dieser mit der Dateiendung überein, wird auch der Suffix entfernt. Inhaltsverzeichnis 1… …   Deutsch Wikipedia

  • basename — ist ein Unix Programm und ein Teil des POSIX Standards.[1] Es gibt den Dateinamen ohne führende Verzeichnisnamen aus. Wird ein Suffix angegeben und stimmt dieser mit der Dateiendung überein, wird auch der Suffix entfernt. Inhaltsverzeichnis 1… …   Deutsch Wikipedia

  • Basename — La instrucción basename muestra en la salida estándar (stdout) el nombre de fichero que se le pase como primer parámetro, eliminando el prefijo del directorio que pueda contener. Si se indica un segundo parámetro y este coincide con el sufijo del …   Enciclopedia Universal

  • Proto-Indo-European to Dacian sound changes — NOTE: all html boxes in this article need to be replaced by another format. The Dacian language was a Satem Indo European Language.hort vowelsPIE has the short vowels e, o. The existence of the PIE short vowel a is disputed.The origin of the Late …   Wikipedia

  • List of English words of Turkic origin — This is a list of words that have entered into the English language from the Turkic languages. Many of them came via traders and soldiers from and in the Ottoman Empire. There are some Turkic words as well, most of them entered English via the… …   Wikipedia

  • 8.3 filename — An 8.3 filename [cite web |url=http://msdn2.microsoft.com/en us/library/aa365247.aspx |title=Naming a File |publisher=Microsoft Developer Network ] (also called a short filename or SFN) is a filename convention used by old versions of DOS and… …   Wikipedia

  • Filename — Screenshot of a Windows command shell showing filenames in a directory The filename is metadata about a file; a string used to uniquely identify a file stored on the file system. Different file systems impose different restrictions on length and… …   Wikipedia

Compartir el artículo y extractos

Link directo
Do a right-click on the link above
and select “Copy Link”