The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Compare date from db2 table to yesterday's Unix system date sasaliasim Shell Programming and Scripting 9 12-01-2008 11:37 PM
Change System Date Ricole AIX 1 07-26-2006 10:29 PM
I want to get day from the current system date gopskrish UNIX for Dummies Questions & Answers 2 06-24-2005 09:52 AM
system date Prafulla UNIX for Dummies Questions & Answers 1 02-01-2002 06:42 AM
file date vs. system date ober5861 UNIX for Dummies Questions & Answers 8 09-11-2001 02:36 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 11-18-2008
Manish4 Manish4 is offline
Registered User
  
 

Join Date: Apr 2008
Posts: 5
Red face using system date in awk

hi,

I'm getting some issues while running below awk:-
I want to use the system date to get pritned on the report but not getting it
please help in this case

BEGIN
{
sysdate = substr($date,5,6)
print "WEA\t\t\t\t\t\t\t\t\t\tCLAIM AND APPROVAL REPORT"
print "REPORT RUN DATE:",$sysdate
print "\t\t\t\t\t\t\t\t\tThere are no No Charge ARA's to be Claimed and Approved today"
}
END

Thanks
  #2 (permalink)  
Old 11-18-2008
manosubsulo manosubsulo is offline
Registered User
  
 

Join Date: Aug 2008
Posts: 87
Try this...

Code:
BEGIN
{
       "date +%d-%b-%Y" | getline d ;
       print "WEA\t\t\t\t\t\t\t\t\t\tCLAIM AND APPROVAL REPORT";
       print "REPORT RUN DATE: ",d;
       print "\t\t\t\t\t\t\t\t\tThere are no No Charge ARA's to be Claimed and Approved today" ;
       close("date");
}
END
Closed Thread

Bookmarks

Tags
awk

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 08:48 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0