stuck. very stuck.
why? because i can't figure out a replacement command that works by giving an index
what i'm doing now is:
rpl "oldstring" "newstring" "filename"
ofcourse this changes all the search results.
what i need is something like this:
rpl "index" "newstring" "filename"
or
rpl "index" "oldstring" "newstring" "filename"
what i've found but doesn't work for me is:
sed '35s/.*/foo/' $filename
where 35 is the line number
and foo is the string that i want to replace the old line with
^-- works but i can't seem to figure out how to build my own string,
i've tried :
sed '${index}s/.*/${replacementline}' $filename
note: the line i'm trying to change in the file occurs several times. (i'm trying to work with an index to fix this problem, wich caused the current problem)
i've been working on this long enough now.. and i'm new to linux's commands, i haven't got the experience yet to make complex commands myself.
thanks for helping ^^!