This question already has an answer here:
I am trying to make a script that switches files at different times of days so that my settings are pulled at different times like a day mode and a night mode.
If I have a file 1, 2, and 3 which 3 is a group of settings for my server. I want to switch out 1 to become 3 from 8am to 6pm. then I want 2 to become 3 from 6pm to 8am automatically. How can I do this though shell script? I just want to basically do a
cp -v 1 3 then
cp -v 2 3 on a schedule how would I accomplish this? thanks in advance!
I don't want to do it through cron i want to do it through shell script only, if possible!!