date problem
ked v bashi zbehnem tento prikaz:
current_date="$($date +%Y%m%d)$($date +%H%M%S)"
date="$($date +%d/%m/%Y)$($date +%H:%M:%S)"
dostanem error hlasku: /bin/date: invalid date `@1352373881'
Preco..?
Dakujem.
Pre pridávanie komentárov sa musíte prihlásiť.
localhost:/$ current_date="$($date +%Y%m%d)$($date +%H%M%S)"
-bash: +%Y%m%d: command not found
-bash: +%H%M%S: command not found
localhost:/$ date="$($date +%d/%m/%Y)$($date +%H:%M:%S)"
-bash: +%d/%m/%Y: No such file or directory
-bash: +%H:%M:%S: command not found
localhost:/$
IMHO Tvoja otazka patri skôr do shell skripting fora alebo bash shell fora.
Nuž ale, navod na bash najdes v PDF napr. tu: Bash shell scripting.
To co si napisal je daleko od spustenia bez chyby. Radsej napis o co ti ide, svojimi vlastnymi slovami.
Napriklad toto funguje bez chyby:
date="$(date '+%d/%m/%Y %H:%M:%S')"