As mentioned previously, sed can be invoked by sending data through a pipe to it as follows − The cat command dumps the contents of /etc/passwd to sedthrough the pipe into sed's pattern space. My approach is the following: use find and its regex capabilities to find the directories in question. Par conséquent, au lieu de regex ws-[0-9]+\.host\.com vous devez utiliser le modèle ws*.host.com (ou ws-+([0-9]).host.com, mais cela ressemble à un peu avancé et je n'ai jamais essayé ça :-) I've tried