On Thu, Sep 15, 2011 at 10:41:43AM +0100, Athanasius wrote: |Date: Thu, 15 Sep 2011 10:41:43 +0100 |From: Athanasius <[email protected]> |To: Gérard Robin <[email protected]> |Cc: [email protected] |Subject: Re: use a variable in .muttrc |User-Agent: Mutt/1.5.18 (2008-05-17) | |On Thu, Sep 15, 2011 at 09:49:14AM +0200, Gérard Robin wrote: -----------------------------8<---------------------------- |> #!/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 |> --------------------------------------------------------- | | The use of '' to enclose the string means bash won't expand any |variables inside. Try "" instead.
sorry it's a rookie mistake on my part :( -----------------------------------8<---------------------------------- |> Why it does not work with $an ? | | Red herring. You're not trying to use $an inside '' in this version. |`` still works inside ''. | |> How to use a variable with mutt ? | | Hope this helps. yes it helped me and I also learn new words: red herring :) Thank you to everyone who replied to me -- Gérard
