All, I am facing an issue with julian date conversion..
current command:
Code:
echo `date +%Y%j` `cat -n /home/user/FILENAME.dat |awk '{printf "%08s", $2}'`
The above command is working good. But in the above bolded part, it is converting system date to julian date.
Hi,
I am trying to display future date from the current date but unable to do so in UNIX (not in PERL). For eg: if today is March 5 then I want a variable wherein I can store Mar 7 date, but unable to get the future date from the current date.
I have tried many possible ways as mentioned below but all in vain.
Hi all,
I have used a bash script which ultimately converts a string into date using date --date option:
Code:
DATE=$DATE" "$TIME" "`date +%Y` //concatenating 2 strings
TMRW_DATE=`date --date="$DATE" +"%s"` //applying date command on string and getting the unixtime
Moderator's Comments:
Hi All,
I have a requirement to fetch logs of last 'N' days.
I am trying the following command which is working fine if it finds the date of that day in logfile.
Code:
START=`TZ="GMT+$((24*N))" date +"%Y %b %d"`
this is being used to fetch 'N'th day's date
and
Code:
awk '/'"$START"'/{p=1} /'"$NOW"'/p' <logfile.log
is being used to fetch the
Hi All,
I have a quick question with regards to SED syntax, and I hope someone here can help me out.
I have some text based reports in which I would like to strip the "Current Date" from and replace with equivalent number of empty spaces, for every occurrence.
For example, here is what I need to strip:
Hi All,
I have a quick question with regards to SED syntax, and I hope someone here can help me out.
I have some text based reports in which I would like to strip the "Current Date" from and replace with equivalent number of empty spaces, for every occurrence.
For example, here is what I need to strip:
Hi,
I'm trying to get the name of a file that has the current date in the name.
The filename is on the form A<current date>01.DC, for example A2012110501.DC
I have this script so far
Code:
date +%y%m%d
D=$(date +%y%m%d)
N=A20$D
echo $N
N2={$N}01.DC
echo $N2
And gets the following output
Quote:
A20121105
}01.DC1105
When I try to a
I need a script to search for *.LOG in a directory, output the line after the current date and yesterday's date and also output the next 5 lines after the current date and yesterday's date
I have tried following commands, still no result
Code:
Currentdate=`date -u +"%m/%d/%y"`
awk '/$Currentdate/{getline; print}' *.LOG
The log has data for the whole month for which I need only the
Hi,
I have a xml file (Config.xml) with following entry
<Date="" Node1="50" Groups="20">
Now I want to use sed to insert/update the Date field with the latest date say - 20120711.