Hello, in order to organize outbox I wrote this script: (year.sh) --------------------------------------------------------- #!/bin/bash
year=`date +%Y`
if [ ! -d ~/Mail/OUTBOX/$year ]
then
mkdir ~/Mail/OUTBOX/$year
echo 'set record==OUTBOX/$year/outbox-`date +%m-%y`'
else
echo 'set record==OUTBOX/$year/outbox-`date +%m-%y`'
fi
---------------------------------------------------------
and in .muttrc I wrote:
source '~/bin/year.sh |'
but it is as if $year did not exist.
but if I write the script year.sh like this:
---------------------------------------------------------
#!/bin/bash
an=`date +%Y`
if [ ! -d ~/Mail/OUTBOX/$an ]
then
mkdir ~/Mail/OUTBOX/$an
echo 'set record==OUTBOX/`date +%Y`/outbox-`date +%m-%y`'
else
echo 'set record==OUTBOX/`date +%Y`/outbox-`date +%m-%y`'
fi
---------------------------------------------------------
it works fine.
Why it does not work with $an ?
How to use a variable with mutt ?
--
Gérard
signature.asc
Description: Digital signature
