In my Mind

{ }

recherche

Aller au contenu | Aller au menu | Aller à la recherche

Mot-clé - shell

POSIX-compliant detection of the shell's

If you want to write a shell script or “library”, you may want to test whether the current shell has a given feature or not, for instance for performance concerns. For instance, if you want to check if a string matches a... lire la suite

Split a string by character(s) in POSIX

Often, when someone needs to split a given string by a character in a shell script, he uses the “cut” command. Example: string='first item,second,third' first="$(echo "$string" | cut -d ',' -f 1)"second="$(echo "$string"... lire la suite

Pseudo-arrays for POSIX shell

Hi everyone, I recently wrote a script and I needed to use arrays. Unfortunately, there are no arrays in the POSIX shell specification. But, after some research I found a way to use pseudo-arrays. The first trick is to... lire la suite

Personnaliser l'ajout et la suppression

Il est aisé sous Debian de créer et de supprimer des comptes (locaux, je précise), mais comment fait-on pour personnaliser le processus ? Par exemple : je veux proposer à l'administrateur d'ajouter le nouvel utilisateur... lire la suite