[Linux-31] problème de script

Pti-Jean jm.mongt at gmail.com
Ven 28 Mar 13:45:03 CET 2014


Le 28/03/2014 13:26, jdd a écrit :
> juste un niveau au dessus

Moi je passerai par un petit script:
<========================================>
$ cat script_pwg_hig.sh
#/bin/sh

mv "$1/*" "$1/../.."
rm -r "$1"
<========================================>

Et je lancerai ce script, comme ça:
$ find . -type d -name pwg_high | xargs -l script_pwg_hig.sh

Et pour évaluer le script, je le modifie comme ça:
<========================================>
$ cat script_pwg_hig.sh
#/bin/sh

echo mv "$1/*" "$1/../.."
echo rm -r "$1"
<========================================>

Voila,

JM
-- 
Chalet à vendre Vosges Le Menil 88 Cadre très joli au bord d'un étang:
http://chalet-du-ruisseau.over-blog.fr/
http://youtu.be/clNc4pXWXsI



Plus d'informations sur la liste de diffusion Linux-31