Re[2]: fax
Hello Anton,
Saturday, March 5, 2005, 3:02:44 PM, you wrote:
>> #!/bin/sh
>> fax_day=/var/spool/fax/$(date +%Y)/$(date +%Y-%m)/$(date +%Y-%m)
>> TEST='test -d $fax_month || mkdir $fax_day'
>> почему каталог не создаётся?
> потому что результат "test -d $fax_month" отрицательный
fax_year=/var/spool/fax/$(date +%Y)
test -d $fax_year || mkdir $fax_year
fax_month=/var/spool/fax/$(date +%Y)//$(date +%Y-%m)
test -d $fax_month || mkdir $fax_month
fax_day=/var/spool/fax/$(date +%Y)//$(date +%Y-%m)//$(date +%F)
test -d $fax_day || mkdir $fax_day
lst=$(la -1 /var/spool/fax/$(date +%Y)//$(date +%Y-%m)//$(date +%F)/* | wc -l)
nr0=$(($lst+1))
if ["echo $nr0 | wc -m " = "2"];then
nr=$(echo 0$nr)
else
nr=$(echo 00$(echo $nr))
fi
fax_shtmp="/var/spool/fax/$(date +%Y)//$(date +%Y-%m)//$(date +%F)//$(date +%F)-$nr"
touch $fax_sht
спасиб разобрался)
почему не работает?
можно-ли упростить?