05-25-2012
Please also post sample data for a day of the month with a single-digit day.
Also sample data for every possible variation in the date field of the input record format.
Last edited by methyl; 05-25-2012 at 11:05 AM..
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi I am very new to scripting,
Can someone show me how to (in unix shell script) compare the system's date with a date in a file. The requirement is to somehow open this file (which will only have a date in it) and compare it with today's date. If they are equal execute a procedure below but if... (4 Replies)
Discussion started by: siog
4 Replies
2. Shell Programming and Scripting
I need to get the date one month in the future from today - or 30 days from today etc...
I need this to work all year around - I cannot find anything to solve this issue in the search / faqs etc.... (5 Replies)
Discussion started by: frustrated1
5 Replies
3. Shell Programming and Scripting
Hello All,
I have a flat file which contains a field with date information. I want to extract the data less than 2 days before without using 'if' Command.
ie. Contents from a file like ..
Ajay,12-jan-09
rajiv,10-jan-09
Nalini,02-jan-09
Sunil,14-jan-09
Pankaj,11-jan-09
As... (2 Replies)
Discussion started by: ssachins
2 Replies
4. UNIX for Dummies Questions & Answers
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
5. Shell Programming and Scripting
Easiest way to get it in the form of MM/DD/YY for Perl 5.8.8? Thanks (4 Replies)
Discussion started by: stevensw
4 Replies
6. Shell Programming and Scripting
Hello,
I have a file like this:
2012112920121130
12345620121130msABowwiqiq
34477420121129amABamauee
e7748420121130ehABeheheei
in case the content of the file has the date of yesterday within the lines containing pattern AB this should be replaced by the current date. But if I use... (3 Replies)
Discussion started by: Lilu_CK
3 Replies
7. Shell Programming and Scripting
Hi,
One of my Unix scripts needs to look for files coming in on Fridays. This script runs on Mondays. $date +"%y%m%d" will give me today's date. How can I get previous Friday's date.. can I do "today's date minus 3 days" to get Friday's date? If not, then any other way?? Name of the files is... (4 Replies)
Discussion started by: juzz4fun
4 Replies
8. Shell Programming and Scripting
Hi
I have file with number status and date1 and date1 field,
want add a column today between column date1 and date2.
file1.txt
number status date1 date2
===== ==== === =====
34567 open 27/06/13 28/06/13
45678 open 27/06/13 28/06/13
43567 open 27/06/13 28/06/13 ... (1 Reply)
Discussion started by: vijay_rajni
1 Replies
9. Shell Programming and Scripting
hello,
in a file exist entries in date format YYYYMMDD. i want to find out, if there are dates, which isn't today's date.
file:
date example text
20140714 <= not today's date
20140715 <= not today's date
20140716 <= today's date
my idea is to use Perderabo's datecalc
... (2 Replies)
Discussion started by: bora99
2 Replies
10. UNIX for Beginners Questions & Answers
Hi Community!
Following on from this code in another thread:
#!/bin/bash
file_string=`/bin/cat date.txt | /usr/bin/awk '{print $5,$4,$7,$6,$8}'`
file_date=`/bin/date -d "$file_string"`
file_epoch=`/bin/date -d "$file_string" +%s`
now_epoch=`/bin/date +%s`
if
then
#let... (2 Replies)
Discussion started by: Greenage
2 Replies
LEARN ABOUT DEBIAN
ipsec_barf
IPSEC_BARF(8) [FIXME: manual] IPSEC_BARF(8)
NAME
ipsec_barf - spew out collected IPsec debugging information
SYNOPSIS
ipsec barf [--short --maxlines <100>]
DESCRIPTION
Barf outputs (on standard output) a collection of debugging information (contents of files, selections from logs, etc.) related to the
IPsec encryption/authentication system. It is primarily a convenience for remote debugging, a single command which packages up (and labels)
all information that might be relevant to diagnosing a problem in IPsec.
The --short option limits the length of the log portion of barf's output, which can otherwise be extremely voluminous if debug logging is
turned on.
--maxlines <100> option sets the length of some bits of information, currently netstat -rn. Useful on boxes where the routing table is
thousands of lines long. Default is 100.
Barf censors its output, replacing keys and secrets with brief checksums to avoid revealing sensitive information.
Beware that the output of both commands is aimed at humans, not programs, and the output format is subject to change without warning.
Barf has to figure out which files in /var/log contain the IPsec log messages. It looks for KLIPS and general log messages first in
messages and syslog, and for Pluto messages first in secure, auth.log, and debug. In both cases, if it does not find what it is looking for
in one of those "likely" places, it will resort to a brute-force search of most (non-compressed) files in /var/log.
FILES
/proc/net/*
/var/log/*
/etc/ipsec.conf
/etc/ipsec.secrets
HISTORY
Written for the Linux FreeS/WAN project <http://www.freeswan.org> by Henry Spencer.
BUGS
Barf uses heuristics to try to pick relevant material out of the logs, and relevant messages which are not labelled with any of the tags
that barf looks for will be lost. We think we've eliminated the last such case, but one never knows...
Finding updown scripts (so they can be included in output) is, in general, difficult. Barf uses a very simple heuristic that is easily
fooled.
The brute-force search for the right log files can get expensive on systems with a lot of clutter in /var/log.
[FIXME: source] 17 March 2002 IPSEC_BARF(8)