I have a file with a lot of lines, two of them are:
in a shell script, I have two variables, for id, the value is always 11 characters/numbersCode:videoId: 'S2Rgr6yuuXQ'
var vid_seq=1;
id='fsafsferii2'
id_seq=80
I want to modify these two lines with id and id_seq
videoId: 'fsafsferii2'
var vid_seq=80;
I used
but there are errors, what is wrong with my script?Code:sed -i 's/\(videoId: \).*\\1'${id}'/\2/' file
thanks
