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 > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #3 (permalink)  
Old 03-24-2008
bisla.yogender bisla.yogender is offline
Registered User
  
 

Join Date: Mar 2008
Posts: 30
Thanks, I got my hint from here. I changed my code to:

sed "/DNGGF10/s/`grep DNGGF10 test|cut -d ':' -f2`/$1/" test >test.chk

Now I am able to replace text only that paritucular line but the space after None are still getting altered which should not happen.

Line before replacing text:

DNGGF10 :None :Test (4 Spaces after None)

After running the script as ./script abc

DNGGF10 :abc:Test

While there should be five spaces after abc.

Kindly suggest.

Regards,
Yogi