06-13-2019
Assumes of course that your fiscal year end is Dec 31.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I want to calculate the date of next satureday of current date using shell script.
Suppose, today is 27-feb-08
I want to get the date of next satureday, which means 01-mar-08, in the formate '' YYMMDD ".
I do this in ksh..
Please tell me any type of command which help me out.
Thanks in... (3 Replies)
Discussion started by: rinku
3 Replies
2. Shell Programming and Scripting
I have a txt file which now has the following output
Sat Mar 6 04:00:01
Sat Mar 6 04:02:09
processing 585
Sat Mar 6 17:00:01
Sat Mar 6 17:00:58
processing 109
Sun Mar 7 04:00:01
Sun Mar 7 04:00:51
processing 309
Sun Mar 7 17:00:01
Sun Mar 7 17:00:41
processing 48
I want output as... (1 Reply)
Discussion started by: gubbu
1 Replies
3. Shell Programming and Scripting
Hello - I have written the following basic shell script to count files, compare files and look for a particular strings in a file.
Problem 1: How do I define more than 1 file location?
#!/bin/bash
#this is a test script
FILES=$(ls /home/student/bin/dir1, home/student/bin/dir2)... (0 Replies)
Discussion started by: DallasT
0 Replies
4. Shell Programming and Scripting
Hi All,
I am trying to generate quarter dates with user giving input as begin date and end date. Example: Input by user:
begin_date = "2009-01-01"
end_date = 2010-04-30"
required output:
2009-01-01 2009-03-31 09Q01
2009-04-01 2009-06-30 09Q02
.
.
till
2010-01-01 2010-03-31 10Q01
... (9 Replies)
Discussion started by: sol_nov
9 Replies
5. Shell Programming and Scripting
Hi all,
I've used various scripts in the past to work out the date last week from the current date, however I now have a need to work out the date 1 week from a given date.
So for example, if I have a date of the 23rd July 2010, I would like a script that can work out that one week back was... (4 Replies)
Discussion started by: Donkey25
4 Replies
6. Shell Programming and Scripting
Hi i am writing a cron job.
so for it i need the 60 days old date form current date in variable.
Like today date is 27 jan 2011 then output value will be stote in variable in formet Nov 27.
i am using EST date, and tried lot of solution and see lot of post but it did not helpful for me. so... (3 Replies)
Discussion started by: Himanshu_soni
3 Replies
7. Shell Programming and Scripting
Hi,
I want to subtract 'n' days from the current timestamp in a k shell script. Is there any inbuilt function to do it
or any workaround solution to get the date. And I want the output to be in YYYY:MM:DD HH:MM:SS format. Please help.
Thanks in advance. (4 Replies)
Discussion started by: Suryaaravindh
4 Replies
8. Programming
Give your an integer (e.g. 0x0076f676) representing the number of minutes elapsed since January 1, 1996.
How to calculate the current date which format should be "year-month-day-hour-minutes" ? (3 Replies)
Discussion started by: qcmao
3 Replies
9. Shell Programming and Scripting
Hi All,
I am new in scripting and working in a project where we have RSyslog servers over CentOS v7 and more than 200 network devices are sending logs to each RSyslog servers. For each network devices individual folders create on the name of the each network devices IP addresses.The main... (7 Replies)
Discussion started by: Pinaki
7 Replies
10. UNIX for Beginners Questions & Answers
I am trying to work on a script where it is a *(star) delimited file has a multiple lines starts with RTG and 3rd column=TD8 I want to substring the date part and
I want to replace with currentdate minus 15 days. Here is an example. iam using AIX server
$ cat temp.txt
RTG*888*TD8*20180201~... (1 Reply)
Discussion started by: Shankar455
1 Replies
LEARN ABOUT OSX
text::diff::table
Text::Diff::Table(3) User Contributed Perl Documentation Text::Diff::Table(3)
NAME
Text::Diff::Table - Text::Diff plugin to generate "table" format output
SYNOPSIS
use Text::Diff;
diff @a, $b { STYLE => "Table" };
DESCRIPTION
This is a plugin output formatter for Text::Diff that generates "table" style diffs:
+--+----------------------------------+--+------------------------------+
| |../Test-Differences-0.2/MANIFEST | |../Test-Differences/MANIFEST |
| |Thu Dec 13 15:38:49 2001 | |Sat Dec 15 02:09:44 2001 |
+--+----------------------------------+--+------------------------------+
| | * 1|Changes *
| 1|Differences.pm | 2|Differences.pm |
| 2|MANIFEST | 3|MANIFEST |
| | * 4|MANIFEST.SKIP *
| 3|Makefile.PL | 5|Makefile.PL |
| | * 6|t/00escape.t *
| 4|t/00flatten.t | 7|t/00flatten.t |
| 5|t/01text_vs_data.t | 8|t/01text_vs_data.t |
| 6|t/10test.t | 9|t/10test.t |
+--+----------------------------------+--+------------------------------+
This format also goes to some pains to highlight "invisible" characters on differing elements by selectively escaping whitespace. Each
element is split in to three segments (leading whitespace, body, trailing whitespace). If whitespace differs in a segement, that segment
is whitespace escaped.
Here is an example of the selective whitespace.
+--+--------------------------+--------------------------+
| |demo_ws_A.txt |demo_ws_B.txt |
| |Fri Dec 21 08:36:32 2001 |Fri Dec 21 08:36:50 2001 |
+--+--------------------------+--------------------------+
| 1|identical |identical |
* 2| spaced in | also spaced in *
* 3|embedded space |embedded tab *
| 4|identical |identical |
* 5| spaced in | tabbed in *
* 6|trailing spacesss
|trailing tabs
*
| 7|identical |identical |
* 8|lf line
|crlf line
*
* 9|embedded ws |embedded ws *
+--+--------------------------+--------------------------+
Here's why the lines do or do not have whitespace escaped:
lines 1, 4, 7 don't differ, no need.
lines 2, 3 differ in non-whitespace, no need.
lines 5, 6, 8, 9 all have subtle ws changes.
Whether or not line 3 should have that tab character escaped is a judgement call; so far I'm choosing not to.
UNICODE
To output the raw unicode chracters consult the documentation of Text::Diff::Config. You can set the "DIFF_OUTPUT_UNICODE" environment
variable to 1 to output it from the command line. For more information, consult this bug:
<https://rt.cpan.org/Ticket/Display.html?id=54214> .
LIMITATIONS
Table formatting requires buffering the entire diff in memory in order to calculate column widths. This format should only be used for
smaller diffs.
Assumes tab stops every 8 characters, as $DIETY intended.
Assumes all character codes >= 127 need to be escaped as hex codes, ie that the user's terminal is ASCII, and not even "high bit ASCII",
capable. This can be made an option when the need arises.
Assumes that control codes (character codes 0..31) that don't have slash-letter escapes ("
", "
", etc) in Perl are best presented as hex
escapes ("x01") instead of octal ("