Perl: Finding next day


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Perl: Finding next day
# 8  
Old 06-13-2010
And some more ...

4. An Oracle DBA can set up scripts that write messages to alert logs, which basically are files in the underlying OS. Let's say you have just one log file with each message preceded by the date and timestamp. Maybe one day, you want to find out who all logged on yesterday, or last weekend or last month.

5. A web server like Apache may write messages at different times, to the same log file. And you may want to find out all messages written at an earlier date.

6. Consider an online shopping cart. You order a book at Amazon.com, for example. It shows you an expected date of delivery. There again you have a need to find out a future date, maybe based on an algorithm.

7. When you pay your credit cart online, you usually see the date when the amount will be debited from your bank account. It could be next day or the next business day (if the next day's a weekend, for instance). So there's the need to find out a future date.

8. If we are talking about the need to access later or earlier dates, then you'll find many examples in the world of databases.

In case of data warehouses for example, searching for information on previous date or time intervals is a very common activity. A manager may want to know the sales of last month, last year etc.

In case of Decision Support Systems (DSS), you may need to forecast certain things like sales, revenue, profits etc. based on the data of current and prior dates. Forecasting (or projection) could be for the next month, next year etc.

9. And there are many more...

You just need to observe the world around you, and you'll find them.

tyler_durden
These 2 Users Gave Thanks to durden_tyler For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Perl script with lock to execute only once in a day

Hi, I am new to perl and have a script to which i want to ensure that no matter how many ever times i execute the script it should execute only once per day. Cronjob is not a safe method as I want to built in capability inside the script. (1 Reply)
Discussion started by: ctrld
1 Replies

2. Shell Programming and Scripting

finding the previous day date and creating a file with date

Hi guys, I had a scenario... 1. I had to get the previous days date in yyyymmdd format 2. i had to create a file with Date inthe format yyyymmdd.txt format both are different thanks guys in advance.. (4 Replies)
Discussion started by: apple2685
4 Replies

3. Shell Programming and Scripting

Finding Day of the week from date

I have a problem of Finding Day of the week from date, but i need to do it within awk On SOLARIS Input:20101007(YYYYMMDD) Output:Thursday kindly provide suggestions. Thanks in advance (8 Replies)
Discussion started by: junaid.nehvi
8 Replies

4. Shell Programming and Scripting

Finding perl files without documentation

I have an application consisting of a number of perl files. I want to find those perl files that have no documentation yet, so I tried the following from the root level of the directory where the application resides: perldoc -r * The output is something like the following: No documentation found... (2 Replies)
Discussion started by: figaro
2 Replies

5. Shell Programming and Scripting

Deleting / finding files older than X days missess a day

Hi When trying to find and delete files which are, say, 1 day, the find command misses a day. Please refer the following example. xxxd$ find . -type f -ctime +1 -exec ls -ltr {} \; total 64 -rw-rw-r-- 1 oracle xxxd 81 Apr 30 11:25 ./ful_cfg_tmp_20080429_7.dat -rw-rw-r-- 1... (4 Replies)
Discussion started by: guruparan18
4 Replies

6. UNIX for Dummies Questions & Answers

How to find Day of the Week from the given date (Perl)?

How to find the Day of the Week of the given Date using perl? If I have a date in YYY--MM-DD format, how to find the DOW? Based on that, I need to find the following sunday. Pls help. (5 Replies)
Discussion started by: deepakwins
5 Replies

7. Shell Programming and Scripting

Previous day's date in Perl?

Hi All, I want to find the previous day's date and store that in a variable, which will be usuful for further processing. Any help please. Regards, raju (4 Replies)
Discussion started by: rajus19
4 Replies

8. Shell Programming and Scripting

Finding out the first business Day of the month

Hi , I want to find out the first business day of the month using korn shell programming.... ie if March 1 is saturday , March 2 is sunday and 3 is monday My code should identify the First business day..as March 3.. hope u got it.. suggestions ??? Pls look into this asap...... (1 Reply)
Discussion started by: phani
1 Replies

9. Shell Programming and Scripting

How to find 1 day old file on Windows for Active Perl

How to find 1 day old file on Windows for Active Perl? Is there anyone know the method? If UNIX or LINUX, we can use the "find ...". How to we do for Windows? (4 Replies)
Discussion started by: lcfoo
4 Replies

10. Shell Programming and Scripting

finding duplicates with perl

I have a huge file (over 30mb) that I am processing through with perl. I am pulling out a list of filenames and placing it in an array called @reports. I am fine up till here. What I then want to do is go through the array and find any duplicates. If there is a duplicate, output it to the screen.... (3 Replies)
Discussion started by: dangral
3 Replies
Login or Register to Ask a Question