Software :: Calculate Minutes To The Next 0:00 Midnight Is, In A Shell Script?
Feb 4, 2010
How can I calculate minutes to the next 0:00 midnight is, in a shell script ? Example it may be 07:10 or 22:36 now and I want to find out how many minutes to the next 0:00 midnight is ?
View 1 Replies
ADVERTISEMENT
Jul 28, 2010
I'm trying to calculate the minutes difference between two dates using the function mktime() on c++. The dates will be passed to me as struct tm, and I will use this function many many times. The example below shows what I wanna do:
Code:
int main(int argc, char** argv) {
while (1) {
tm date2;
tm date1;
[code]...
I read the mktime() description on c++ reference, searched google... but there is no light
View 4 Replies
View Related
Mar 15, 2011
I'm using mencoder to capture audio from a Encore ENLTV-FM3 video capture device. I have recently noticed that, since one week ago, when the machine was forcibly restarted due to a power outage, all recordings are slightly pitched, they play back slower than they should.
I narrowed down the problem to the following command line:
$ time mencoder -really-quiet -tv driver=v4l2:device=/dev/video1:chanlist=us-cable:audiorate=32000:alsa:adevice=hw.1:input=0:amode=1:normid=11 -endpos 00:10:00 -ovc copy -oac pcm -of rawaudio -o test-32000.wav tv://69
real 9m54.886s
user 0m5.536s
sys 0m1.740s
$ ls -l test-32000.wav
-rw-r--r--@ 1 martin martin 76800000 Mar 15 17:20 test-32000.wav
Somehow, mencode managed to gather precisely 10 minutes worth of raw audio in 9m 55s. That's not physically possible, unless the capture device's A/D converters are "overclocked". I can't think of any other explanation besides hardware failure. Can that be? Could it be that something got burnt during the power outage and now the capture device's internal clock went nuts?
Since the machine's restart, I've also noticed dmesg is flooded with entries like this:
CE: hpet increased min_delta_ns to XXX nsec
Which seem to indicate that the computer's high precision event timer is somehow out of sync. Does this have to do with the audio issue? Can it be that the audio converter's sample rate is linked to the HPET? I'm totally lost here. Has anyone bumped into something similar?
View 2 Replies
View Related
Jun 29, 2010
What happened to Midnight Commander?
View 7 Replies
View Related
Jan 10, 2010
I have a problem accessing a ftp server with SSL/TLS active with Midnight Commander.By now I'm quite sure that Midnight Commander does not support SSL/TLS.Anybody know of a alternative to MC with SSL/TLS support or a work around so that I'm able to use MC?A non cli ftp-client is not an option because the machine I'm accessing from is in runlevel 3.
View 1 Replies
View Related
Apr 2, 2011
Subject says it all, how do I add midnight commander to xwmconfig as a selection?
I have not downloaded mc yet.
View 6 Replies
View Related
Jul 31, 2010
below is the default for a week using the program backintime@weekly nice -n 19 /usr/bin/backintime --backup-job >/dev/null 2>&1Did I edit the crontab right for once a week on friday at 12am?0 0 * * 5 nice -n 19 /usr/bin/backintime --backup-job >/dev/null 2>&1
View 1 Replies
View Related
Mar 25, 2011
MC remembers which panel (left or right) had the focus when closing. The next time MC opens that panel receives the focus. Is there a way to disable that option where the focus is always the left panel?There is a Command option (shortcut Ctrl-u) to swap the panels. I prefer MC simply start with the focus on the left panel.
View 2 Replies
View Related
Jun 29, 2011
I am using Midnight Commander, namely this package:mc-4.7.5.2-1.fc15.x86_64I have noticed it always returns me to the directory it was started in, no matter what is told in its manual.Are there simple means to override this behavior and quit it in the current directory (as expected when quit via F10)?
View 9 Replies
View Related
Mar 16, 2011
This problem has been bugging me since KDE4 starting shipping. In konsole, if you use the default black on white profile, and you start Midnight Commander, the color of the MC screen is the default blue color it has always been. However, if you change to the green on black profile, which is the one that I prefer, and you start MC, the blue changes to some unreadable light robin egg blue which is horrid.
I'm making a huge assumption here, but it looks like something is off with the green on black profile in Konsole. Try it yourself and you will see what I mean. This only started with KDE4, but it still persists through every version to current.
View 4 Replies
View Related
Jun 26, 2010
I prefer to use the built-in editor that came with mc, which can be accessed with 'mc -e', however, I find when using midnight commander, if I type 'F4', then I'm presented with nano, which isn't what I want.
View 1 Replies
View Related
Mar 15, 2011
To enable samba virtual file-system in mc (under slackware-current), mc's configure needs different arguments than before. See the attached patch.
Code:
--- mc.SlackBuild.~0~2010-11-11 21:37:44.000000000 +0100
+++ mc.SlackBuild2011-03-15 16:56:36.765258508 +0100
@@ -85,9 +85,9 @@
[code]....
View 1 Replies
View Related
Oct 14, 2010
I know this is going to sound lazy but can midnight commander be installed to ubuntu server 10 from another distro cd?
View 1 Replies
View Related
Dec 25, 2009
Since I began using F11, Midnight Commander takes a life to start. Previous versions of Fedora didn't give me any problem. I know many of you don't use it, but for those who needs MC, anyone is having the same trouble? F11 x86_64.
View 1 Replies
View Related
Apr 7, 2011
In Midnight Commander, is it possible to exclude some directories/patterns/... when doing search? (M-?) I'm specifically interested in skipping the .hg subdirectory.
View 1 Replies
View Related
Dec 22, 2010
The visual file manager Midnight Commander has the menus Left, File, Command, Options and Right.
Is there any shortcut key to open these menus?
View 3 Replies
View Related
Feb 24, 2011
I have a daemon script which wakes up every 5 minutes and checks the health of started processes. It works fine during the day but throws a syntax error just after midnight.Here is the log:
(02/22-23:49) Check all started processes
(02/22-23:54) Check all started processes
(02/22-23:59) Check all started processes
[code]....
View 9 Replies
View Related
Jul 14, 2010
After upgrading to Lucid, MC looks ugly - like some colors are missed. Its very difficult to work in MC now - directories and files have same color for example. [fantomas@fantomas-laptop]:-boot.png. Also, applying different themes (skins) changes bottom bar (with menu: F1 F2 etc) button colors only, not affecting colors of panels. Install 4.7.3 build of MC from here: [URL]...
View 7 Replies
View Related
Feb 16, 2010
When running MC in xterm or gnome-terminal, it doesn't seem to allow the use of Ctrl-enter and Ctr-shift-enter to copy marked files to the command line.
Does anyone know of another way to cause this to happen or a way to enable it under xterm/gnome-term?
View 6 Replies
View Related
Jan 9, 2011
I need a console based file manager for 10.4 and my beloved mc is no longer installable.
View 4 Replies
View Related
May 29, 2010
I can't upgrade. I get:
Quote:
Could not calculate the upgrade
An unresolvable problem occurred while calculating the upgrade: The package 'skype-common' is marked for removal but it is in the removal blacklist.
This can be caused by:
* Upgrading to a pre-release version of Ubuntu
* Running the current pre-release version of Ubuntu
* Unofficial software packages not provided by Ubuntu
This is most likely a transient problem, please try again later.
I tried again several times in different days and it is the same. I have 10.4 recently updated from my original installation of 9.10. I think it was not a pre-release, I did it automatically from the website and it took a long time. As far as I know, all I have installed is official, except perhaps Skype itself. There seems to be something connected with Skype. But I have exactly the same Skype I had with 9.10, where I updated every few days with no trouble. It is something peculiar in 10.4
View 7 Replies
View Related
Feb 17, 2010
I am a brand new member
here is my question :
in a RedHat configuration :
i need to be sure that a partition has been formatted with those parameters code...
View 3 Replies
View Related
May 3, 2010
I tried to upgrade Ubuntu Server Edition 9.10 to 10.04. Gives me this warning:
Code:
Could not calculate the upgrade An unresolvable problem occurred while calculating the upgrade: E:Unable to correct problems, you have held broken packages.However, the packages appear to be fine. Checked with apt-get and nothing wrong.
View 9 Replies
View Related
Jul 19, 2010
i have problem with upgrade manager. i try upgrade fron 8.04 to 8.10. where is my main.log:
2010-07-19 15:52:51,749 INFO release-upgrader version '0.93.34' started
2010-07-19 15:52:51,752 DEBUG Using 'DistUpgradeViewText' view
2010-07-19 15:52:51,795 DEBUG enable dpkg --force-overwrite
[code]....
View 1 Replies
View Related
May 30, 2011
I received the following error today and I did a search on the net. I tried sudo rm /var/cache/apt/archives/* but it didn't help. Could not calculate the upgrade An unresolvable problem occurred while calculating the upgrade. report this bug against the 'update-manager' package and include the following error message: 'E:Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.'
View 9 Replies
View Related
Jun 2, 2011
I am familiar with common video resolutions like 320x240, 640x480 and 720x480. Sometimes I want to use other video resolutions when encoding videos. Is there a formula to calculate the unknown value for the heightxwidth if one value is supplied? For example, if I want my video to be 480xWidth, what value should Width be to get proper aspect.
View 2 Replies
View Related
Sep 1, 2010
I have a csv file (id, loc, timestamp, impressions) that I need to derive some low-level calculations from. Im ok with basic sort and grep operations, but this one is challenging my feeble scripting skills (normally I�d throw it into a spreadsheet, but in this case Id like to ultimately create a script that I could automate). Ive already used cat/sort to order the csv file first on location and then timestamp so it looks like this:
Abt001, AA, 2009-01-01 10:51:00, 231
Cup002, AA, 2009-01-01 10:54:00, 3
Saf001, AB, 2009-01-01 10:51:00, 25
[code]....
What Id like to do is output to file a record of the total, min, and max number of impressions for each location. , e.g.
AA6504 3231
AB252525
AC37925109
ZZ35512341
how to do this and Im kind of stuck on how to approach it I think the combined steps of looping through the locations along with the min/max/sum calculations are throwing me. Eventually Id also like to do additional calculations like average, ect. but I think I can figure that out on my own if I can just get this part down.
View 10 Replies
View Related
Jan 4, 2010
I am working one project and i want to know that is it possible to find out the DNS (BIND) QPS (query per second). I mean how many QPS BIND can handle.
View 2 Replies
View Related
Jun 30, 2010
I want to calculate length of my array, say Unix here.
Code:
[linux1@HMLINUX1 abc]$ declare -a Unix=('Debian' 'Red Hat' 'Suse' 'Fedora');
[linux1@HMLINUX1 abc]$
[linux1@HMLINUX1 abc]$ echo ${#Unix[@]}
5
This should be ideally 4, but somehow it is showing as 5. However, when I am removing the space as RedHat instead of Red Hat, it is working perfectly.
Code:
[linux1@HMLINUX1 abc]$ declare -a Unix=('Debian' 'Redhat' 'Suse' 'Fedora');
[linux1@HMLINUX1 abc]$ echo ${#names[@]}
4
View 4 Replies
View Related
Nov 11, 2010
We have a DSL , how can we calculate the available bandwidth so that we can shape the packet, We can assume the bandwidth to be 100mbps on the ethernet interface However, in DSL devices, the train rate(Bandwidth rate ) is varies according to different situation. How can i get the available bandwidth rate(from varies)?. Any method is there for getting the available bandwidth value....
View 7 Replies
View Related