which

which

Sur les autres projets Wikimedia :

Which est un pronom relatif anglais signifiant « lequel ».

which est également une commande POSIX qui retourne le chemin des fichiers qui seraient exécutés dans l'environnement courant si ses arguments avaient été donnés comme commandes dans un interpréteur de commandes strictement conforme à POSIX. Pour ce faire, which cherche dans la variable PATH les fichiers exécutables correspondants aux noms des arguments.

Exemple sous bash :

$> which which
/usr/bin/which
$> which less 
/usr/bin/less
$> which echo
/bin/echo

Which se trompe pour echo, puisque c'est la plupart du temps une primitive du shell.
Sous zsh, which est une primitive du shell, ce qui lui donne l'avantage de retrouver les alias, les commandes internes et les fonctions du shell.

$> which which
which: shell built-in command
$> which less 
/usr/bin/less
$> which echo 
echo: shell built-in command

Voir aussi

GNU Core Utilities

Liens externes


Wikimedia Foundation. 2010.

Contenu soumis à la licence CC-BY-SA. Source : Article which de Wikipédia en français (auteurs)

Игры ⚽ Нужен реферат?

Regardez d'autres dictionnaires:

  • Which — Which, pron. [OE. which, whilk, AS. hwilc, hwylc, hwelc, from the root of hw[=a] who + l[=i]c body; hence properly, of what sort or kind; akin to OS. hwilik which, OFries. hwelik, D. welk, G. welch, OHG. wel[=i]h, hwel[=i]h, Icel. hv[=i]l[=i]kr,… …   The Collaborative International Dictionary of English

  • Which — which  Unix утилита, отображающая полный путь к указанным командам или сценариям. Содержание 1 Описание 2 Опции 3 Пример использования …   Википедия

  • Which — Voir « which » sur le Wiktionnaire …   Wikipédia en Français

  • Which — is an English relative pronoun and interrogative pronoun.Which may also refer to: *Which?, a UK charity and its magazine *which (Unix), a Unix command See also * English relative clauses, for discussion of when to use which and when to use that… …   Wikipedia

  • Which? — Infobox Magazine title = Which? image size = image caption = frequency = Monthly category = Consumer publisher = Which? firstdate = October 1957 country = flagcountry|United Kingdom language = English website = [http://www.which.co.uk… …   Wikipedia

  • which — I. adjective Etymology: Middle English, of what kind, which, from Old English hwilc; akin to Old High German wilīh of what kind, which, Old English hwā who, gelīk like more at who, like Date: before 12th century 1. being what one or ones out of a …   New Collegiate Dictionary

  • Which? — a magazine produced each month by the Consumers’ Association in Britain. It consists of reports comparing different makes of similar products and services, to help people to decide which one to buy. It is only available to members of the… …   Universalium

  • which — See: GAME AT WHICH TWO CAN PLAY …   Dictionary of American idioms

  • which — See: GAME AT WHICH TWO CAN PLAY …   Dictionary of American idioms

  • Which (Unix) — which Voir « which » sur le Wiktionnaire …   Wikipédia en Français

  • Which (Unix) — which is a Unix command used to identify the location of executables.which takes one or more arguments; for each of these arguments, it prints to stdout the full path of the executable that would have been executed if this argument had been… …   Wikipedia

Share the article and excerpts

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