Sponsored Content
Full Discussion: Time subtraction using perl
Top Forums Shell Programming and Scripting Time subtraction using perl Post 302415034 by tomjones on Wednesday 21st of April 2010 02:39:59 PM
Old 04-21-2010
I tried it and this was my output

107382063610738185091074160772107416091610741609521074160988


think there is somthing wrong
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

subtraction from date

hi gurus! i realize that my question shows my stupidness, but i need your help! i have: s_date=`date +%m-%d-%Y_%I%p` variable and i need the same, but minus one hour.. what i made: s_date=time(`date +%m-%d-%Y_%I%p`) - 3600 but i'm getting: daily_exports.sh: line 20: syntax error near... (4 Replies)
Discussion started by: MarGur
4 Replies

2. Shell Programming and Scripting

awk subtraction

hi i have file 1 as follows: 6 7 8 9 10 i have file 2 as follows: 5 5 5 5 5 i want file 3 as follows: (4 Replies)
Discussion started by: npatwardhan
4 Replies

3. Shell Programming and Scripting

Date subtraction

hi, i set up a script on my server to do a particular task once files from an external system are ftpd in the format compaq_20100110 (YYDDMM). Interestingly, the source of ftp is sending the files in the format e.g 20100109 i.e. previous date and for some reason this fails.kindly see my script... (2 Replies)
Discussion started by: bigtejus
2 Replies

4. Shell Programming and Scripting

use of uninitialized value in subtraction

Hallo all i am trying to execute this script ............... But this is throwing the error...... use of uninitialized value in subtraction in at icd_convert.pl line 156 use of uninitialized value in subtraction in at icd_convert.pl line 157 use of uninitialized value in subtraction in at... (1 Reply)
Discussion started by: suvenduperl
1 Replies

5. Shell Programming and Scripting

Date Subtraction with time.

HI gurus... I have a PERL file that help me extract the date and time of the file. The format of this is: yyyymmddhhmmss. Example: 20100430070935 (April 30 2010 07:09:35) How can i subtract the acquired time from system's time..?? The answer... (6 Replies)
Discussion started by: bankimmehta
6 Replies

6. Shell Programming and Scripting

Perl :How to print the o/p of a Perl script on console and redirecting same in log file @ same time.

How can i print the output of a perl script on a unix console and redirect the same in a log file under same directory simultaneously ? Like in Shell script, we use tee, is there anything in Perl or any other option ? (2 Replies)
Discussion started by: butterfly20
2 Replies

7. Shell Programming and Scripting

Help required between "wall time" and Elapsed time in perl.

Hi, I have having a great confusion in under standing the below terms. a) "wall time" (time according the the clock on the wall vs. cpu time spent executing it) what exactly it means? For example: wall time cpu time line:text 4.22404 24.186 if(some junk condition) ... (1 Reply)
Discussion started by: vanitham
1 Replies

8. Shell Programming and Scripting

Subtraction

Hi #!/bin/sh month=`date +%m` year=`date +%Y` echo $month a=02 # Retaining Data for Current and Previous Month lmonth=`expr $month - $a` if test "$lmonth" = "0" then lmonth=12 year=`expr $year - 1` fi echo $year echo $lmonth The output is (3 Replies)
Discussion started by: Abhayman
3 Replies

9. Shell Programming and Scripting

Subtraction using arrays

Hello all . I have two arrays. ${ARRAY_MOUNT_POINT_CAPACITY} ${ARRAY_MOUNT_POINT_CAPACITY}. Whats the synatx of subtracting their values , placing them in variable V1 and then echoeing it ??? Ive tried expr and let ...gives me ./test_code.sh: difference: bad number (3 Replies)
Discussion started by: Junaid Subhani
3 Replies

10. Shell Programming and Scripting

Need Help on date subtraction

I have dates as follows in a file 20121029135649 20121029135721 20121030091540 20121030093420 20121030094340 20121030095427 20121030095856 20121030100104 20121030100251 All these dates are in sorted order. I need to find out the difference between the dates as follows 2nd row... (6 Replies)
Discussion started by: meetsriharsha
6 Replies
CDDB_get(3)						User Contributed Perl Documentation					       CDDB_get(3)

NAME
CDDB - Read the CDDB entry for an audio CD in your drive SYNOPSIS
use CDDB_get qw( get_cddb ); my %config; # following variables just need to be declared if different from defaults $config{CDDB_HOST}="freedb.freedb.org"; # set cddb host $config{CDDB_PORT}=8880; # set cddb port $config{CDDB_MODE}="cddb"; # set cddb mode: cddb or http $config{CD_DEVICE}="/dev/cdrom"; # set cd device # user interaction welcome? $config{input}=1; # 1: ask user if more than one possibility # 0: no user interaction # get it on my %cd=get_cddb(\%config); unless(defined $cd{title}) { die "no cddb entry found"; } # do somthing with the results print "artist: $cd{artist} "; print "title: $cd{title} "; print "category: $cd{cat} "; print "cddbid: $cd{id} "; print "trackno: $cd{tno} "; my $n=1; foreach my $i ( @{$cd{track}} ) { print "track $n: $i "; $n++; } DESCRIPTION
This module/script gets the CDDB info for an audio cd. You need LINUX, SUNOS or *BSD, a cdrom drive and an active internet connection in order to do that. INSTALLATION
Run "perl Makefile.pl" as usual. ("make", "make install" next) LICENSE &; DISCLAIMER This library is released under the same conditions as Perl, that is, either of the following: a) the GNU General Public License Version 2 as published by the Free Software Foundation, b) the Artistic License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either the GNU General Public License or the Artistic License for more details. You should have received a copy of the Artistic License with this Kit, in the file named "Artistic". If not, I'll be glad to provide one. You should also have received a copy of the GNU General Public License along with this program, in the file names "Copying"; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. If you use this library in a commercial enterprise, you are invited, but not required, to pay what you feel is a reasonable fee to the author, who can be contacted at armin@xos.net AUTHOR &; COPYRIGHT (c) 2003 Armin Obersteiner <armin(at)xos(dot)net> SEE ALSO
perl(1), Linux: /usr/include/linux/cdrom.h, Solaris, *BSD: /usr/include/sys/cdio.h. perl v5.12.1 2006-01-01 CDDB_get(3)
All times are GMT -4. The time now is 04:01 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy