4 ms·
How does this work? I get an error? sed: can't read s/^127.0.0.1 f....
by jayalpha 8y ago
How does this work? I get an error?
sed: can't read s/^127.0.0.1 f....
- glass_of_water 8y agoIf you're using macOS, you'll need to do sed -i "" ... (put an empty string argument after the -i flag). If the second to last argument on the command line is -i, I think on the version of sed that ships with most distros, sed assumes that the argument to -i is the empty string and that the last argument in the command is the pattern. The version that ships with macOS, on the other hand, always treats the argument after -i as the extension to use for the backup file.
- jayalpha 8y agoNo, I use ubuntu sed: can't read s/^127.0.0.1 facebook.com/#127.0.0.1 facebook.com/: No such file or directory
- scarecrowbob 8y agoIf it's helpful, I have to run this as su on macOS. I got no idea if it works for anyone else.