General :: Calculate Duration In Seconds In Bash ?

Nov 15, 2010

I would like to subtract the end time with a start time in bash. How can I do it?

Here's a script of example of what I want:

View 8 Replies


ADVERTISEMENT

General :: Calculate Local Time In Seconds?

Sep 3, 2010

I`m looking to calculate my Local Time in seconds from APOC - 1970.I found only - date +%s -> that display the UTC and not my Local Time.

View 3 Replies View Related

General :: Bash - Command To Find Files Changed In Last N Seconds?

Jun 21, 2011

Linux command to find files changed in last n seconds. shell script,that we can run from cli or command.

View 3 Replies View Related

Ubuntu :: Calculate An Average In A Simple Way With Bash?

Mar 3, 2010

does anyone know how to calculate an average in a simple way with bash? I've got something like this:

Code:
$ cat results.txt | head -10 | tr " " " " | cut -f13
0.23929285124
0.404716908011
0.35113102608

[Code]....

and now I want to calculate the average of the resulting numbers. I know I could write a bash or awk or perl script and use that, but isn't there a more simple, elegant way? There is for example "sum" in the coreutils, but no "avg"..

View 9 Replies View Related

Programming :: Bash Calculate The Repeated Lines?

Jan 28, 2010

i have a sorted file with many repeated lines like this:

1ujw
1ujw
1ul1
1us7

[code].....

i need to calculated haw many times each line is repeated, for ex

1ujw 2
1ul1 1
1us7 5
etc.

View 5 Replies View Related

Programming :: Calculate Logarithm In Bash Script?

Dec 12, 2008

I want to calculate log in bash script. I searched but could not find any bash command to directly do it. I am also thinking to send the variable in C program, calculate in C and get the answer back in bash script.But I think it is a long process. as I have to do this

i) gcc -o log log.c

ii) ./log > log_result.txt

iii) then read the result from log_result.txt

View 5 Replies View Related

General :: Monitor Process Duration ?

Jun 14, 2011

We have the below script, to check the process MEDT, if it doesn't run , then it will send a message immediately. the same script, if I want to check if it is continously running for more than 1 hour, then it should do the action mentioned below.

View 2 Replies View Related

General :: RHCE Exam Duration

Mar 12, 2010

I am planning to take up RHCE exam, but i have a doubt about the exam duration does it consist of 2 section where section 1 is for 2.5 hrs and section 2 is for 3 hours (total 5 1/2 hours) or does it consist of single section of 3.5 hours.

View 1 Replies View Related

General :: Time Duration From One Command To Another ?

Aug 8, 2011

I have made a shell script as below to find that how much time is taking between one command to another.

View 3 Replies View Related

Software :: Bash Script To Run Commands For Specified Number Of Seconds?

Dec 2, 2009

I want to make a very simple bash script to run a command for a user-specified number of seconds and then kill it. The purpose is to limit the amount of time the program runs.Example in pusedocode:

Code:
#!/bin/bash
#$1 is the user input number of seconds

[code]...

View 14 Replies View Related

Programming :: Bash: Convert Decimal To Minutes:seconds?

Jan 13, 2011

I have a script in the works that reads an MP3 file and gets the track length. Trouble is, it gives me the total seconds, like this:

Sample Track.mp3 = 225.55 seconds

What I'd like to have is that 225.55 converted into minutes:seconds format (in this case, 3:45). How can I do this?

View 10 Replies View Related

General :: Thunderbird - Incoming Mail Signal Duration ?

Mar 25, 2011

I'm trying to set up my Thunderbird 3.1.8 (running on Ubuntu 10.04 LTS) to play a .wav file of my choice when new mail arrives. The file I've chosen is 8,8 KB in size and lasts 3 seconds. I've selected the "Play a sound" + "Use the following sound file" options in my Preferences, but only the first second (if that) of the sound gets played - both when I click the "Play" button in the Preferences menu to test it, as well as when receiving mail. Restarting the program with my new settings doesn't help.

Actual question(s):
- Is there a limit on the size/duration of the sound one can use for such a signal in this program?
- Is there any way to modify this limit?

View 2 Replies View Related

General :: How To Calculate Video Resolutions

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

General :: Looping Through Csv File To Calculate Avg/min/max?

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

General :: Calculate The Hours Usage Per Day Over A Certain Period?

Dec 13, 2010

Between the dates 21-June-2007 to 12-December-2010 there are 1270 days. If the total cumulative time a hard drive has been active is 344 days (found this via Disk Utility in Ubuntu 10.10) since it was bought 1270 days ago. What is the average usage hours per day?

View 2 Replies View Related

General :: Calculate Time Period In Scripting

Mar 16, 2011

Now i am writting one bash script. in that my requirement is i need to create one directory and that the directory details to be stored in one file Ex. date/time and all in one file. after that i need to delete the folder automatically exactly after 3months. between these time period in 2month itself i need to send one mail to admin "regarding this still one month only more to delete the folder" . is it possible to do like that date calculation in script.

View 10 Replies View Related

General :: Calculate Total Memory Consumed By User?

Sep 20, 2010

is there a way to calculate the total memory consumed by user ?

View 12 Replies View Related

General :: Calculate Usable Bytes On A Disk Partition?

Mar 10, 2010

How do you calculate the number of usable bytes on a disk partition? When I do an fdisk -l I get this:

Disk /dev/md0: 192.0 GB, 192069500928 bytes
2 heads, 4 sectors/track, 46891968 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

[code]...

View 7 Replies View Related

General :: Mapping With Series From Master File And Calculate Count?

Sep 7, 2010

My shell script is calculating the count of each shortcode series wise whose sample output is as follows:

Code:

56882
9124 1
9172 1
9173 4

[code]....

View 1 Replies View Related

Ubuntu :: Audio Duration Zero / Fix For This?

May 7, 2010

I recently did a fresh install of 10.04 and am experiencing a really weird issue. I right click on an audio file (in my case an MP3) and pull up the properties. I select the Audio tab and look at the duration for the file. All of my file (which play just fine) are showing a zero duration. Is this a known bug and is there a fix for this somewhere?

I should note that these are all valid MP3 files, with duration time previously showing under a 9.10 install.

View 3 Replies View Related

General :: Calculate Minimum Ext3 Partition Size For Certain Amount Of Data?

Aug 5, 2011

These following ext3 partitions contain identical data. As we can see, the larger the partition size, the more space is required for the same files:

Filesystem 1K-blocks Used Available Use% Mounted on
/dev/loop11 3965777 561064 3199964 15% [...]
/dev/loop19 573029 543843 29186 95% [...]

[code]....

View 2 Replies View Related

OpenSUSE :: Set KDE4 Notifications Duration?

Jun 8, 2011

Is it possible to set how quickly the notifications in KDE4's notifications widget will disappear? They stick around a couple of seconds too long for my taste.

View 9 Replies View Related

General :: Grep String From Logs Of Last 1 Hour On Files Of 2 Different Servers+calculate Count?

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

Debian Configuration :: Kernel Compilation Duration

Apr 10, 2011

I have squeeze installed on an AMD machine. i compiled the kernel based on the config file in the /boot.
it was surprisingly much time:

This was the first time using AMD machine, i had experience with some P4 machine to have much shorter kernel compilation time.

The machine:

what do i do in the wrong way? or is it the "feature" of the this old AMD?

View 7 Replies View Related

Debian Multimedia :: Duration Of Dial-up Connections ?

Oct 22, 2010

On Debian 5.0 I wish record the duration of the dial-up connections. To connect I use Wvdial through Gnome PPP graphic interface. Do you know a program with graphic interface or that it creates a simply log file with for each connection: date-time start connection, date-time end connection, telephone number called?

View 3 Replies View Related

Ubuntu Multimedia :: Jack Stops All Audio For The Duration Of Its Run

Mar 9, 2011

I have had no problems whatsoever with audio in ubuntu 10.10. Both input and output have worked great, but alas now there's a problem.

I recently installed ardour2 with jack (using apt-get) but for some reason, anytime I start ardour2 (which starts jack implicitly) all audio stops on the whole computer. That is my computer goes silent. As soon as I exit ardour2 audio resumes.

Also, although this will probably resolve itself when I resolve the other problem, when exporting a project to audio file from ardour2 it exports silence for the entire duration, even when ardour2 is exited and audio has resumed.

I'm no linux novice, so I'm not afraid of command line solutions (I prefer them actually) however I know nothing about jack or audio editing in linux whatsoever, so if you could be very specific about jack terminology that would be great.

View 1 Replies View Related

Security :: Escalated Privileges - Determine/change Duration?

Jul 18, 2010

Ubuntu 10.04

When I execute a sudo or gksu evolution (e.g. synaptic package manager) I find that the escalated privileges remain in effect for a period of time. Sometimes, not often, the notifier applet shows an icon indicating that escalated privileges are in effect.

What I would like to know:

What is the default amount of time which escalated privileges remain in effect on my system?

Is it possible, if so how, to change this amount of time?

View 3 Replies View Related

Server :: Disable LDAP Users With Specified Time Duration

Feb 1, 2011

How to disable the LDAP Users automatically with the specified time duration. For this any configuration file required or else a script need to be written.

View 1 Replies View Related

Ubuntu Multimedia :: Wrong Time Duration After Concatenating Mp3 Files?

Nov 5, 2010

I have the following problem;When I concatenate several mp3 files the time duration is falsely detected by Rhythmbox when I open the newly created mp3 file. VLC Player however detects the correct time duration. I tried two ways of mergen the mp3's and both have the same falsely result. - mp3wrap- catI currently fixed it by opening the mp3 in VLC player and converted it again to a mp3 file which resolved the issue at hand. However this is not a solution I would like to have, nor a answer to what is the cause of the problem.So my question is simple -- what is the issue with the mp3 file and why is Rhythmbox indicating a falsely time duration?

View 3 Replies View Related

Ubuntu Networking :: Low Retention Duration For Cached Addresses By DNSMASQ

Nov 12, 2010

I am experiencing severe DNS delays today, so I tried to install DNSMASQ by following the instructions given on several pages on the web to make it function as a local DNS cache.

The installation was successful, and after editing the configuration files as instructed, I now have a working DNS cache on my computer.

However, it seems that the addresses are not cached for a long time ; for a given domain, the speedup lasts for a few minutes. If I try to access a previously visited domain once more after several minutes, a new (slow) external lookup is made.

Since websites' IP addresses are not changed every five minutes, would there be a way to tell DNSMASQ to keep the IPs in the cache for a long time (several hours at least) ?
This is very important for me because the DNS lag that I am experiencing makes external lookups last 10 to 20 seconds.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved