View Single Post
Old 09-28-2016, 07:51 PM   #250
Alan_S
Evangelist
Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.Alan_S ought to be getting tired of karma fortunes by now.
 
Alan_S's Avatar
 
Posts: 446
Karma: 1084584
Join Date: Aug 2007
Location: Sisak, Croatia
Device: Kobo Aura H2O, Kobo Aura ONE
How we can make script to automatically use both these commands?

For example, name of the script would be settime.sh, it would be run with same parameters as date (settime 23:12:11) and it would automatically set date to that time and afterward execute hwclock command.

Code:
#!/bin/sh

date $1
hwclock -w -u
How can I best run my newly created script settime.sh from KSM, or its terminal? Any suggestion how to set this up to easily set both system and hardware clock?
Alan_S is offline   Reply With Quote