Ubuntu :: Use "sleep" In A Bash Script To Count Down To A Certain Hour Each Day?
Feb 10, 2010
I want to use "sleep" in a bash script to count down to a certain hour each day. What I need is to find the time NOW, find the difference between NOW and 2am, and sleep for that many seconds. So, using bash, how can I find the time NOW and find the difference to 2am?
View 9 Replies
ADVERTISEMENT
Dec 14, 2010
Previously I had posted a question on how to make it run every 7 minutes between 7 and and 11pm.However now I found out what I really need is every 7 minuted between 7:30 and 11pm BUT it has to be every 7 minutes, it cannot reset itself on the top of every hour, so the */7 wont work.How can it that it will be every 7 minutes, so it will go at 7:30, 37,44,51, 58, 8:05, etc..
View 4 Replies
View Related
Sep 3, 2010
I am trying to grep a particular string from the files of 2 different servers without copying and calculate the total count of its occurence on both files. File structure is same on both servers and for reference as follows:
Code:
27-Aug-2010 10:04:30,601|919122874903|phtunes_app|1282243292627|NotifySmsReception|DMGenerateLogInterceptor - ExternalTransactionID:SDP-DM-26713018, TransactionStatus:Requested
27-Aug-2010
[code]....
View 6 Replies
View Related
May 3, 2010
I would like to count all the jpgs in my home folder I need a command like this:
~$ Sudo count -R /*/*.jpg
View 3 Replies
View Related
Jan 7, 2011
I need to search through HTML files to count the number of <li> tags nested within the first <ul> tag:
Code:
<ul>
<li>text 1</li>
<li>text 2</li>
</ul>
...
<ul>
[Code]...
Unfortunately, the second grep is greedy swallowing everything up to the last </ul> close tag. (The desired result is 2.) Speed is an issue as I will be searching through 350,000 files.
View 14 Replies
View Related
Feb 25, 2010
I'm working on a bash script that will go through a directory, find the sub-directories that have been created since the last time the script ran, count the results, and output that integer (will most likely be '1' or less per each instance run) to a file. Give the circumstances, my previous (and very limited) experience with bash is not sufficient for me to pull this off. since it probably has bearing, is that my mail server stores files that it flags as viruses in a folder. It creates a sub-directory for each virus that it quarantines .I want to count those subdirectories and graph them with MRTG. Hence the script. I'm going to post what I've got so far and the purpose of it, because I'm told I have a very odd and efficient way of doing scripting.
[Code]...
But then it dawned on me that it wouldn't work because I would have to not count the directories that have already been counted and count the ones that have not been counted. Given that the purpose of this is to generate a graph about every 5 minutes, using find won't work because, to my knowledge, that will only find things based on whole day values, I need it almost down to the minute.
View 1 Replies
View Related
Mar 24, 2010
I recently decided to try KDE4 and would like the change the clock on the panel to display 12 hour format and not the default 24hour format but i can not find where to change this option currently the clock looks like the attached picture. Gnome has this option and I would like to see it in KDE if it exists in the default clock. I am willing to replace the default KDE clock with a seperate widget if one exists for this.
View 1 Replies
View Related
Aug 11, 2010
I would like to parse an input file in which there are two columns per each row. We want to see how many lines are duplicated where we define duplicate to be having the same second field and different first field. For instance if the input file looks like the following:
79874 13131
79873 12309
79820 13131
[code]...
View 10 Replies
View Related
Jun 17, 2011
I just switched over to Lubuntu, and so far, it's been great.It's rendering quite well with my laptop, even though the fan is constantly running.I've had some small annoyances that I haven't been able to figure out. How do I get the power button and/or other related actions to the 'start' menu? Is there a way to drag and drop applets like in Ubuntu? How do I setup default brightness like in Ubuntu? How do I change the time to normal US time (12 hour instead of 24 hour)How do I change the time to a 12-hour instead of 24-hour?Is there a software center?
View 2 Replies
View Related
Aug 5, 2010
I need to change the time displayed in the task bar from a 24 hour clock to a 12 hour format. I could not find the relevant settings in OpenSuse 11.2 and same is the case for 11.3 as well.
how to make the change? I have tried System Settings ---> Computer Administration ---> Date & Time; but I was not able to make the desired change.
Similarly, I have a digital clock widget that shows GMT + 5.5 hours and I need to change that to 12 hour format as well.
View 3 Replies
View Related
Sep 27, 2010
My question is simple, is it possible to enable and disable automatic sleep/hibernate/standby using BASH? I need it for a bash script.Been searching for a while now, can't seem to find it.
View 2 Replies
View Related
Feb 24, 2010
I have the following perl/DBI script:
Quote:
#!/usr/bin/perl
use DBI;
my ($db, $user, $pw) = ('dbname', '****', '***********');
my $dbh = DBI->connect("DBI:mysql:$db",$user,$pw) or die "Cannot connect to $db: $DBI::errstr
[code].....
The error message is
[Wed Feb 24 13:03:27 2010] myscript.cgi: DBD::mysql::st execute failed: Column count doesn't match value count at row 1 at myscript.cgi. [Wed Feb 24 13:03:27 2010] myscript.cgi: DBI::db=HASH(0x8a30c60)->errstr
View 2 Replies
View Related
Apr 2, 2010
No clue how to change the 24 hour clock format in Lubuntu 10.04 Beta.
View 6 Replies
View Related
Nov 23, 2010
I have a python script that I would like to run every hour regardless of whether I am logged in. I have tried putting a link to the script in cron.hourly, however, it does not run.
View 9 Replies
View Related
Jul 12, 2011
why did i have every time a black screen after 1 hour and can do nothing any more. But the music that play with rhytmbox is playing good.No energy saving only screen saver that must be active after 10 min non activitie on pc
View 3 Replies
View Related
Apr 17, 2010
My internet disconnect mabe every second hour and I have to restart the Ubuntu to get internet again. This started to happen when I bought a new wireless card called NETGEAR WG311v3. The live CD didnt have the drivers for it so I had to download XP drivers and install it with ndisrwapper.
So my question is how do I fix it? Do other network drivers crash with my current one? If so how can I see wish one to remove?
Note that my card works fine with XP on same computer.
View 5 Replies
View Related
Apr 30, 2010
Installed Lucid netbook-remix on my Aspire One with SSD and 3 cell battery last night. Under 9.10 I got 2hr 15mins with wifi and up to 3hr without wifi. This morning on the train to work I booted the new release only to find that without wifi I'm now getting only 1hr 20mins battery life (fully charged battery). I have the brightness turned down low to try and save a little power but it makes no difference. What can I do. As this is a netbook-remix release having just over an hour of battery life is plain awful and impractical.Any suggestions to increase battery life?
View 9 Replies
View Related
Aug 31, 2010
Recently moved into amazon's ec2 cloud and noticed our server time was in UTC where we use EST. I did some looking around, and changed using the following;
Followed up setting the correct time using the date command with the correct time, then date showed;
Now, that is correct, but if I do an ntpdate pool.time.org or any other time server, the offset is huge and the date moves back one hour. Is this a daylight settings or something I am just missing?
View 2 Replies
View Related
Nov 20, 2010
After daylight savings time, my squeeze installation's clock failed to adjust. I've tried to change this in the bios, but it always resets itself.
Is there a way to force-change the time?
View 3 Replies
View Related
May 11, 2010
I have a script that I want to run for one hour.
I used to use doalarm to make it run for one hour then stop but it is not working consistently so I need another solution.
How would you make a script run for one hour then stop?
View 14 Replies
View Related
Jan 15, 2010
how to schedule updates for clamav (every hour)?
View 9 Replies
View Related
Nov 29, 2010
I want to know what other people have done to stop their computers from crashing. My main computer has now crashed 5 times in the last hour and a half.
I am not using Compiz, and to the best of my knowledge it is uninstalled. I try not to use flash with the internet. I am using the 64 bit version of 10.04, because I want to make use of my 8GB of RAM.
The computer crashes constantly. Constantly. Usually when I am using it. I can leave it on for days without a problem; but as soon as I need to get work done, it starts crashing.
Some specs:
ASUS P7P55D Pro motherboard
Intel i5-750 processor.
evga GTS 250 video card with NVIDIA drivers (uptodate)
8GB RAM
Ubuntu 10.04 64 bit
I need a gameplan to make this computer stop crashing. how to start diagnosing the causes of these crashes.
View 9 Replies
View Related
May 25, 2011
I have a Trendnet TEW-649UB Wifi N dongle, and I'm using the latest Realtek firmware downloaded from their website. It works ok, but everytime, after an hour or two, the blue light turns off and the dongle stops working. I have to unplug it and plug it back to bet my network back up.
View 2 Replies
View Related
Nov 15, 2010
I wish to run a cron job every half hour, where exactly do I put the job? The reason I am asking is that I am used to entering jobs into crontab, I am not used to using fedora and its cron layout.
View 2 Replies
View Related
Jun 14, 2011
I'm running a fully updated Fedora 15.In Evolution's calendar, my days are limited to 12 hours: from 0:00 to 11:45, always.Under preferences->Calendar and Tasks->General, I have "day begins" as 07:00, and "day ends" as 23:30. Changing these numbers has no effect whatsoever. Selecting "12 hour" under "time format" also does nothing.I REALLY hope this isn't a deliberate change by the Evolution developers. My days have normally consisted of more than 12 hours since I was three or four (I'd have to call my parents to ask). Jokes aside, what's going on and how do I change this?
View 3 Replies
View Related
May 9, 2010
I have an indexer for sphinx, and i want it to run once every hour in linux. How would i do this?
View 8 Replies
View Related
May 28, 2010
I found (Red Hat Fedora Core 6 Server) a CRON entry for "backupmng" that has repeats at 1,16,31 and 46 minutes every hour of every day, 24/7.It is located at:/usr/local/psa/admin/sbin/backupmng >/dev/null 2>&1.
View 1 Replies
View Related
Apr 12, 2010
Currently whenever i run date command output is shown like
Mon Apr 12 05:17:21 IST 2010
When its 17:17 Here.
How would i change it so that it should show.
Mon Apr 12 17:17:21 IST 2010
View 9 Replies
View Related
May 20, 2011
Yesterday I configured an NTP Server, and synched a sever with my NTP Server. Now some how my Client clock jumped one hour ahead at 12:00 AM, while HW Clock and NTP Server Clock remained.
Code:
cat /etc/sysconfig/clock
# The ZONE parameter is only evaluated by system-config-date.
# The timezone of the system is defined by the contents of /etc/localtime.
ZONE="Asia/Karachi"
[Code]....
View 2 Replies
View Related
Jan 20, 2010
I need to build a system that can provide me capacity to send more than 50.000 mails per hour. Now I have inherit a server farm with 40 postfix servers, and one server managing which of this servers send the mails but its programming for someone but it's too complex. I would like to have a new system for do that, (To manage hotmails, Yahoo and others complains i have a contract with a specialist company to have ours ips in whitelist, activate and deactivate servers )
View 8 Replies
View Related