i-have-a-dreambox.com | Dreambox - Support

Register Calendar Members List Team Members Galerie to Portal Go to the Main Page

Boardrules Frequently Asked Questions Statistik Statistik Search Pinwand Dreambox Blog Ihad/Gemini Fan-Shop
i-have-a-dreambox.com | Dreambox - Support » ...::: Archiv - Support für ältere Dreambox Modelle :::... » ...::: Dreambox und Images DM 800SEv2 :::... » Allgemeines zur DM800SEv2 » [gelöst] Bash: date berechnen » Hello Guest [Login|Register]
Last Post | First Unread Post Print Page | Add Thread to Favorites
Post New Thread Post Reply
Go to the bottom of this page [gelöst] Bash: date berechnen
Author
Post « Previous Thread | Next Thread »
dki2e
Newbie


Registration Date: 14.02.2010
Posts: 65
Which box: DM 800S; D-Box
External Storage: USB-Stick; NFS
Which Image: Gemini
Welcher Bildschirm: Panasonic TX-L37G15E

[gelöst] Bash: date berechnen Reply to this Post Post Reply with Quote Edit/Delete Posts Report Post to a Moderator       Go to the top of this page

Moin moin,

hoffe ich bin hier richtig und suche nach einer Lösung:
sufu hab ich schon benutzt, leider kein treffer oder bediener-error.

Aufgabe:
Datum soll um xTage addiert werden.

Unix:
s=$(date +"%Y%m%d" -d "+1 day"); echo $s

DreamBox:
Da bekomme ich es nicht hin.
Kann mir da einer Helfen?


Besten Dank

This post has been edited 1 time(s), it was last edited by dki2e: 24.04.2017 20:48.

24.04.2017 15:42 dki2e is offline Send an Email to dki2e Search for Posts by dki2e Add dki2e to your Buddy List
Fred Bogus Trumper
V.I.P.


images/avatars/avatar-19905.png

Registration Date: 15.12.2008
Posts: 2,663
Which box: DM800se; DM820; DM900; DM7020HD; DM7080HD
External Storage: USB-Stick; SD-Card; HDD; NFS
Which accessories: Netgear WNCE2001, DMM Tastatur (de), Logitech Harmony, Eigenbau NAS
Which Image: Sonstige

RE: Bash: date berechnen Reply to this Post Post Reply with Quote Edit/Delete Posts Report Post to a Moderator       Go to the top of this page

zur aktuellen Zeit in Sekunden 86400 Sekunden addieren (24h*60min*60sec = 864000 = 1d)

code:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
root@dm7020hd:~# current_time=$(date +%s)
root@dm7020hd:~# echo $current_time
1493046139
root@dm7020hd:~# date -d @$current_time
Mon Apr 24 17:02:19 CEST 2017
root@dm7020hd:~# new_time=$(( $current_time+86400 ))
root@dm7020hd:~# echo $new_time
1493132539
root@dm7020hd:~# date -d @$new_time
Tue Apr 25 17:02:19 CEST 2017
root@dm7020hd:~# 


__________________
Gruß Fred

This post has been edited 2 time(s), it was last edited by Fred Bogus Trumper: 24.04.2017 17:13.

24.04.2017 17:04 Fred Bogus Trumper is offline Search for Posts by Fred Bogus Trumper Add Fred Bogus Trumper to your Buddy List
dki2e
Newbie


Registration Date: 14.02.2010
Posts: 65
Which box: DM 800S; D-Box
External Storage: USB-Stick; NFS
Which Image: Gemini
Welcher Bildschirm: Panasonic TX-L37G15E

Thread Starter Thread Started by dki2e
Reply to this Post Post Reply with Quote Edit/Delete Posts Report Post to a Moderator       Go to the top of this page

besten dank, hat funktioniert.


bG
24.04.2017 20:46 dki2e is offline Send an Email to dki2e Search for Posts by dki2e Add dki2e to your Buddy List
Tree Structure | Board Structure
Jump to:
Post New Thread Post Reply
i-have-a-dreambox.com | Dreambox - Support » ...::: Archiv - Support für ältere Dreambox Modelle :::... » ...::: Dreambox und Images DM 800SEv2 :::... » Allgemeines zur DM800SEv2 » [gelöst] Bash: date berechnen

Privacy policy | Team | Suchen | Hilfe


Powered by Burning Board 2.3.6 © 2001-2003 WoltLab GbR