The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Need help in changing Mod time of a file ali560045 Shell Programming and Scripting 6 09-23-2008 03:45 AM
Changing what time a process thinks it is with libfaketime iBot UNIX and Linux RSS News 0 09-22-2008 12:10 PM
changing modified time ali560045 Shell Programming and Scripting 1 06-12-2008 06:55 AM
[help] changing time on solaris 8 sparc bucci SUN Solaris 2 07-26-2007 12:17 AM
How to MV without changing Time Stamp redlotus72 UNIX for Dummies Questions & Answers 3 07-15-2005 07:16 PM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 09-29-2008
suri.tyson suri.tyson is offline
Registered User
  
 

Join Date: Jul 2008
Posts: 20
Changing the output in own time display's.

Hi all, I've written a script which collects some information and sendsout a mail.. (code pasted below)

ssh -l ora${sid} ${primaryhost} "tail -50 /oracle/$ORACLE_SID/newbackup/END_BACKUP.log" |grep 'insert' |tail -1| awk '{print $7}' >> ${RESULTFILE}

Output would look like this: ('20080920212141','net','Q05','DB','0','20080921064023','netbackup','netbackup')

Now i want to display only the time start & end time with return code "0" in the middle of the line as one of the format below.

2008/09/20/ 21:21:41
Sat Sep 20 21:21:41

How do i do this..?

And in the script am greping for word 'insert' and taking the last line and again doing Print $7.. do this am able to get the whole things which is in (******)... but i dont want all the information.

Can someone please help me how to do this..

Thanks in advance..
 

Bookmarks

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 05:50 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