The UNIX and Linux Forums  


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




Thread: Parsin Problems
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 04-22-2009
jascas jascas is offline
Registered User
  
 

Join Date: Apr 2009
Posts: 13
Parsin Problems

Hi all
I have this line of code for parsing .properties but it does not work corectly. As you can see I want to put an "XxxX" at the end of each line that has an "=" in it and it must exclude those that have ".png".

sed -e '/=/ {/\.png/!s/,/XxxX,/}' -e '/=/{/\.png/!s/$/XxxX/}' "${name}" >"${RESULT}"

This is ok but it does not work correctly. When I run it it puts "XxxX" on a new line instead of the end of the line. Also I want to change it so it does NOT modify the line if it ends in a number character or ".gif"

Thanks for your help
- James