View Single Post

  #3 (permalink)  
Old 05-01-2005, 09:13 AM
postyrus postyrus is offline
Junior Member
 
Join Date: Apr 2005
Posts: 3
Rep Power: 0
postyrus
Send a message via MSN to postyrus Send a message via Yahoo to postyrus
Default

Yeah thanks for your reply. I was thinking about using sed the other night and found out it was far easier to do what i was after than awk. However i have run into another problem.

How do i replace for example:

BIAS UD=34 UG=20

so if i wanna replace UG=20 with UG=30 i can use sed 's/UG=20/UG=30/'' ...easy.

But i am incrementing a UG from the command line so i need to change the UG occurrence already in the file with my new one ...eg:

INC=40

sed 's/UG=*/UG='$INC'/' i need to be able to change UG=* in the file where star is any value...is there anyway to take star as wildcard instead of literally? sorry for my poor english. Its hard to explain my problem.
Reply With Quote