Re: bash - date format
* Matthias Meyer <matthias.meyer@gmx.li> wrote:
> Hallo,
>
> Ich kriegs irgendwie nicht hin den date Befehl in eine Variable zu packen.
> Also fast nicht ;-)
> timestamp="date +%Y/%m/%d_%T"
> echo "`$timestamp - text"
> funktioniert.
Mit den Anführungsstrichen und Backticks? Würde mich wundern..
> Aber
> timestamp="date +%Y/%m/%d %T"
> echo "`$timestamp - text"
> funktioniert nicht. Also das BLANK vor dem %T will er nicht.
timestamp=`date '+%Y/%m/%d %T'` oder timestamp=$(date '+%Y/%m/%d %T')
Gruß
Jens
Reply to: