how to change a certain line in a file, using SED ?



I have a test file that is about 5000 lines long. There are about 30
different lines in this file where each line looks exactly like this:

CODE = 1234


I would like to use a UNIX command (maybe something like sed) to
replace that line mentioned above, that is found on exactly line
number 575 of that file, to something like this:

CODE = 5678


Keep in mind. I don't want to change ALL of the lines with the string
"CODE = 1234" to "CODE = 5678". I just want to do this on line 575 of
that file.

Does anyone know how I can do this in UNIX shell? Thanks.

.



Relevant Pages

  • Re: how to change a certain line in a file, using SED ?
    ... I would like to use a UNIX command to ... I don't want to change ALL of the lines with the string ... Does anyone know how I can do this in UNIX shell? ... Janis ...
    (comp.unix.shell)
  • Re: parse output and check if a change
    ... output is stored in a Info object. ... The problem is that the output from the unix command might change. ... So the next time I run the unix command I take the output (a string) ... generated the first time. ...
    (comp.lang.java.programmer)
  • Re: parse output and check if a change
    ... output is stored in a Info object. ... The problem is that the output from the unix command might change. ... So the next time I run the unix command I take the output (a string) ... generated the first time. ...
    (comp.lang.java.programmer)
  • Re: unix command to delete parts of a file
    ... I'd like to ask if there's a unix command that could delete ... > parts of the file given a string. ... > Given: File1 which contains ... -ooo- Andy ...
    (comp.unix.admin)
  • Re: how to change a certain line in a file, using SED ?
    ... I have a test file that is about 5000 lines long. ... I would like to use a UNIX command to ... we're on a mission from God! ... -- The Blues Brothers ...
    (comp.unix.shell)