I’m trying to use the sed command to replace text in a config file with the line
sed -e 's/pass/Awmusic12635/2w' -i config.yml
I have already cd to the directory to where the file is, but every time I run it I get the error
sed: couldn't open file : No such file or directory
What could be causing this?
OS: Ubuntu 10.10 32bit
Change your command to
passon every line toAwmusic12635pass, it’ll not be replacedpass, just change2(second) tog(global)wmeanswrite, but you didn’t provide a file name afterw, so you see the err msg.-ioption meansedit-inplace, so you don’t need thew