[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Neue Mailboxen mit sed "erzeugen"



Christian Schmidt <christian.schmidt@chemie.uni-hamburg.de> wrote:
[...]
>  #! /bin/sh
>  #
>  MONTH=`date --date="1 month ago" +%Y-%m`
>  NEWMONTH=`date +%Y-%m`
>  #
>  # Search all mboxes that received mails last month:
>  #for MBOX in `find ~/test -name \*$MONTH`;
>  for MBOX in `find ~/test -name \*$MONTH`;
>    do
>    # Change file names - not the contents!
>    echo $MBOX|sed -e 's/$MONTH/$NEWMONTH/g'
[...]

Innerhalp von single-quotes ' findet keine Variablensubstition statt,
du willst -s "s/$MONTH...."
             cu andreas
-- 
NMUs aren't an insult, they're not an attack, and they're
not something to avoid or be ashamed of.
                    Anthony Towns in 2004-02 on debian-devel



Reply to: