Go Back   The UNIX and Linux Forums > Operating Systems > Linux > Red Hat
Search Forums:



Red Hat Red Hat is the world's leading open source technology solutions provider with offerings including Red Hat Enterprise Linux (RHEL), Fedora, open source applications, security and systems management, virtualization, and Services Oriented Architecture (SOA) solutions.

Reply    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 02-09-2012
Registered User
 

Join Date: Apr 2008
Posts: 102
Thanks: 0
Thanked 0 Times in 0 Posts
grep problem

Hi,

I am running a command line from a solaris command line onto a red hat linux:

Solaris line works:

TODAY2="Feb"
TODAY3="08"
TODAY4="2012"

search4=">>> file process at ... ${TODAY2} ${TODAY3} ........ ..T ${TODAY4}<<<"

SF4=`grep "$search4" filename | nawk 'BEGIN {FS=" "} {print $13}'`

echo $SF4:

>>> file process at Wed Feb 08 14:54:53 GMT 2012<<<

On Linux server it does not work it returns nothing????? as though it cannot find the string??? i am confused
It is something to do with the .... but i need these as I am not sure what will be populated within these positions at that time.

any help would be appreciated.
Sponsored Links
    #2  
Old 02-09-2012
itkamaraj's Avatar
Unix is God
 

Join Date: Apr 2010
Posts: 2,330
Thanks: 21
Thanked 466 Times in 455 Posts
can you provide the sample input file contents and the expected output
Sponsored Links
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Problem with grep balesh Shell Programming and Scripting 2 04-19-2011 05:46 AM
Problem in GREP ???? skyineyes Shell Programming and Scripting 1 12-16-2008 12:54 AM
problem with grep... mpeyper Shell Programming and Scripting 2 08-28-2008 02:25 AM
Problem with GREP. syndex Shell Programming and Scripting 2 07-11-2007 01:44 PM
grep problem rraajjiibb Shell Programming and Scripting 4 11-17-2004 05:41 AM



All times are GMT -4. The time now is 12:27 AM.