Bug that unnecessary files are created when the -i and -e options are added to the sed command.

problem

For example, if you do the following

sed -i -e 's/# gem "rails"/gem "rails"/' ./Gemfile

An unnecessary file named Gemfile-e is created.

solution

Put " " after the -i option.

sed -i "" -e 's/# gem "rails"/gem "rails"/' ./Gemfile

Recommended Posts

Bug that unnecessary files are created when the -i and -e options are added to the sed command.
[LPIC 101] I tried to summarize the command options that are easy to make a mistake
[Memorandum] ① Get and save tweets ~ I want to identify the news tweets that are spread ~
A solution to the problem that files containing [and] are not listed in glob.glob ()
About the bug that anaconda fails to import numpy and scipy
I want to connect remotely to another computer, and the nautilus command
I tried to summarize the methods that are often used when implementing basic algo in Quantx Factory
I tried to control the network bandwidth and delay with the tc command
I tried to summarize the umask command
I want to visualize where and how many people are in the factory
[Python] Solution to the problem that elements are linked when copying a list
I tried to pass the G test and E qualification by training from 50
I want to be notified when the command operation is completed on linux!