All pastes #675999 Raw Edit

Mine

public text v1 · immutable
#675999 ·published 2007-08-30 18:08 UTC
rendered paste body
#!/bin/bash -

if [ ! "$1" ] && [ ! "$2" ]; then
    echo "qcp: fichier_source fichier_destination"
    exit 1
fi

echo $@ >> /tmp/qlist

if [ "$(cat /tmp/qq)" = "0" ]; then
    while [ $(cat /tmp/qlist | wc -l) != 0 ]; do
        echo "1" > /tmp/qq
        echo "cp -r $(cat /tmp/qlist | head -n 1)"
        cp -r $(cat /tmp/qlist | head -n 1)
        sed -i '1d' /tmp/qlist
    done
    echo "0" > /tmp/qq
fi