Sponsored Content
Top Forums Shell Programming and Scripting How to increment a user defined date value in the DATE format itself using shell script? Post 302382072 by jim mcnamara on Tuesday 22nd of December 2009 05:29:01 AM
Old 12-22-2009
This question is asked almost every day. Please use the forums search facility. In the FAQ you will find Perderabo's DateCalc script.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Log File date compare for user defined range

:confused: Hi i am a noob and need a little help to finish my shell script. I am learning as i go but hit a problem. I am search thorugh logs(*.rv) files to find entires between two user defined dates, The script so far looks for the "START" and "END" of each entry at sees if it belongs To... (0 Replies)
Discussion started by: mojo24
0 Replies

2. Shell Programming and Scripting

Shell Script To increment Date*HElp***

Hi, I want to increment date, using Shell Script, a loop to add one day after 24hrs. :confused: Cheers Kunal (1 Reply)
Discussion started by: niceboykunal123
1 Replies

3. Shell Programming and Scripting

Increment date in script

Hi, Iam new to scripting language.:o can someone help me out solving this thread?hopingly ya....:) I want to write a script which connects to db and searches the count in a table which has date column and id column. If the count is not equal to 0 then it should increment the date with the one... (4 Replies)
Discussion started by: jyothi_wipro
4 Replies

4. Shell Programming and Scripting

Increment Date in a Specific Format

Hi, This may sound a Basic, but please help I Hava a date in the Given Format yyyy_mm_dd Start_date=2008_07_09 (This is a Fixed Date) I need to Increment this Date in a For loop until it equals Current Date For(Start_date<Current_date) xxxxxxxxxxxxxxxxxxxxxxxxxxxx... (0 Replies)
Discussion started by: dsshishya
0 Replies

5. Shell Programming and Scripting

Number of days between the current date and user defined date

I am trying to find out the number of days between the current date and user defined date. I took reference from here for the date2jd() function. Modified the function according to my requirement. But its not working properly. Original code from here is working fine. #!/bin/sh... (1 Reply)
Discussion started by: hiten.r.chauhan
1 Replies

6. UNIX for Dummies Questions & Answers

Shell Scripts - shows today’s date and time in a better format than ‘date’ (Uses positional paramete

Hello, I am trying to show today's date and time in a better format than ‘date' (Using positional parameters). I found a command mktime and am wondering if this is the best command to use or will this also show me the time elapse since 1/30/70? Any help would be greatly appreciated, Thanks... (3 Replies)
Discussion started by: citizencro
3 Replies

7. Shell Programming and Scripting

how to update date part with new increment date time

hi experts, my requirement is like this i need to develop a shell script to update date part with new incremental date time in file some 'X' which is kept at some server location incrementing every two hours.as i am new to this scripting i need support from u people,thanx in advance (1 Reply)
Discussion started by: amanmro
1 Replies

8. Shell Programming and Scripting

Change date format in shell script

Plz help me To display date in the mm/dd/yyyy. Eg. if date is 28-09-2012 the output of the shell script should be date 09/28/2012. (1 Reply)
Discussion started by: shivasaini
1 Replies

9. Shell Programming and Scripting

How to increment date using "for loop" in format MMDDYY inside the shell script?

Need to increment the date from "currentdate + 90days" inside the for loop (i=1 to i=50) (5 Replies)
Discussion started by: aroragaurav.84
5 Replies

10. Shell Programming and Scripting

Date: invalid date trying to set Linux date in specific format

i try to set linux date & time in specific format but it keep giving me error Example : date "+%d-%m-%C%y %H:%M:%S" -d "19-01-2017 00:05:01" or date +"%d-%m-%C%y %H:%M:%S" -d "19-01-2017 00:05:01" keep giving me this error : date: invalid date ‘19-01-2017 00:05:01' Please use CODE tags... (7 Replies)
Discussion started by: umen
7 Replies
Graph::FAQ(3pm) 					User Contributed Perl Documentation					   Graph::FAQ(3pm)

NAME
GD::Graph::FAQ - Frequently asked questions DESCRIPTION
I get errors like "Can't call method METHOD on an undefined value". What gives? You probably had an error somewhere, most likely in the plot() method, and you didn't check for it. See the section on Error Handling in the documentation for GD::Graph to find out how to deal with this sort of thing, and how to get more information about what the error was. I am drawing a bar chart, and the chart area is a lot smaller than the image. What is going on? As of version 1.30, GD::Graph automatically corrects the width of the plotting area of a chart if it needs to draw bars (i.e. for bars and some mixed charts). This is necessary, because rounding errors cause irregular gaps between or overlaps of bars if the bar is not an exact integer number of pixels wide. If you want the old behaviour back, set the correct_width attribute to a false value. I have my data in some format that doesn't look at all like the array that I am supposed to give to GD::Graph's plot method. Do I really need to mess around with array references? Not necessarily. Check out the GD::Graph::Data class. How do I stop those pesky accents appearing around bars or inside area charts? You can set the "accent_treshold" option to a large enough value (larger than your chart). Alternatively, you may like it better to set the "borderclrs" attribute to be the same as the dclrs one. I'll probably include an option in a future version that gives better control over this. Where is the ActiveState ppm of GD::Graph? Ask them. I have asked them, but didn't get an answer. I don't know what to do to get it included in their set of ppms, and I really do not have the time to keep asking them. I believe that GD::graph has finally made it into ActiveState's ppm archive. However, I am going to leave this question here in case they get behind again. Do you have some example code for me? The distribution has a large set of examples in it. If you don't have the original distribution, please get it from CPAN (http://www.cpan.org/ or some local mirror). Will you support X or Y? If you send me a patch that (in a decent manner) adds the functionality to the latest version, I may very well add it for the next release. If you don't send me a patch, but just a question, you will have to be patient. (Please also see the section on bugs in the main body of GD::Graph.) Why does export_format give me a weird string, instead of just 'png' or 'gif'? As of version 1.31, export_format in a list context returns all formats that GD can export. If you are only interested in the answer 'gif' or 'png', make sure that you call it in a scalar context. $export_format = GD::Graph->export_format; $export_format = $graph->export_format; print "Export format is ", scalar $graph->export_format, " "; print "Export format is " . $graph->export_format . " "; @export_formats = $graph->export_format; TrueType fonts don't work when I use GD::Graph from a CGI program. When your programs run as CGI, they typically do not have the same environment as when you use them from the command line. The Perl FAQ, section 9, has some information on this. It is also not guaranteed that your script runs from the directory that it is in. It is probably better to include something like: use GD::Text; GD::Text->font_path("/path/to/my/font_dir"); See the GD::Text documentation for more information about font paths. I'm trying to use GD's builtin fonts, but it's not working. Most likely, you are using the font short name, like gdGiantFont or gdMediumBoldFont, and you have not put a "use GD" in your program. This is needed, because these short names need to be exported into your name space by the GD library: use GD; # ... $graph->set_x_axis_font(gdMediumBoldFont); If you don't want to include the GD library, you can use the longer alternative names (which is what I'd recommend anyway): $graph1->set_x_axis_font(GD::Font->MediumBold); If you "use strict" then you will actually get an error message if you try to use the short names without including the GD module. Also see the GD::Text documentation for this information. When I have many data sets, some end up having the same colour. The default number of colours for data sets is seven, so if you use more than seven data sets, those colours will be re-used for the higher data sets. This is described in the entry for the "dclrs" attribute in the GD::Graph documentation. Can you tell me how to do X? Not necessarily (X might be kind of complicated, after all). Did you look in the samples for something similar? If not, you're probably best off seeing if you can get help from a group of people, rather than one or the other of the overworked individuals whose e-mail addresses are shown below. If you're more comfortable with asking a newsgroup for help, the canonical resource is <comp.lang.perl.misc>; if you prefer web forums, there is a good one at <http://www.perlmonks.org>. In either case, if you are not familiar with the forum and its denizens, you might wish to read the following helpful guide before posting your question: http://www.perlmonks.org/?node_id=172086 Can you fix this bug I've found? Well, I hope so. Please see the "BUGS" section in the main body of GD::Graph for the best way to report it. AUTHOR
Martien Verbruggen <mgjv@tradingpost.com.au> Current maintenance (including this release) by Benjamin Warfield <bwarfield@cpan.org> (c) Martien Verbruggen. All rights reserved. This package is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.12.3 2007-04-26 Graph::FAQ(3pm)
All times are GMT -4. The time now is 02:27 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy