parent
a1b68aa5d6
commit
6dd90cc088
@ -1,9 +1,12 @@
|
||||
#!/bin/bash
|
||||
i=0
|
||||
i=1
|
||||
a=1
|
||||
|
||||
while read L; do
|
||||
if [ $
|
||||
echo "$L" | egrep -q "[0-9]{2}"| tr a-z A-Z
|
||||
shift
|
||||
i=$(($i + 1))
|
||||
if [ $i -eq 0 ]; then
|
||||
echo -n "$a "
|
||||
echo "$L" | egrep [0-9]{2} | tr a-z A-Z
|
||||
fi
|
||||
a=$(($a + 1))
|
||||
i=$(($a%2))
|
||||
done
|
||||
|
@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
for f in $(ls $1); do
|
||||
if [ $(echo "$?") -eq "127" ]; then
|
||||
shift
|
||||
elif [ $# -eq 0 ]; then
|
||||
echo "Aucun arg ou aucun fichier dans ce repertoire" >&2
|
||||
fi
|
||||
if [ ls -l --time-style +%Y-%m-%d $1/$f | tr -s " " | cut -d " " -f 8 -e ]; then
|
||||
cp $f $(ls -l --time-style +%Y-%m-%d $1/$f | tr -s " " | cut -d " " -f 8)
|
||||
else
|
||||
mkdir $(ls -l --time-style +%Y-%m-%d $1/$f | tr -s " " | cut -d " " -f 8)
|
||||
cp $f $(ls -l --time-style +%Y-%m-%d $1/$f | tr -s " " | cut -d " " -f 8)
|
||||
fi
|
||||
done
|
Loading…
Reference in new issue