here is the file that I have; want to be able to remove ONE line from the file containing a string that matches, the following command is being used and is not working.
sudo sed '/chefmaster/d' ./myhost1 > ./myhost2
Any thoughts ?
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
[url removed, login to view] [url removed, login to view] chefnode
[url removed, login to view] [url removed, login to view] chefmaster
Bu iş için 25 freelancer ortalamada $21 teklif veriyor
17 years experience with System Administration and Computer Security. [login to view URL] profile - [login to view URL] Skype ID - pdjoyner Contact me to discuss this project. Thank you, Paul Joyner
Hello! We are a group of electrical engineers and web developers. We will be happy to help you with a sed command that matches and deletes a line from a file. You may drop us a PM anytime and we will be happy to assist Daha Fazla
Hi there. Basically you have (this is the text file): hello world hello hello And you want to remove the lines that contains hello, right? $ cat a hello world hello world $ sed '/hello/d' a > b $ cat b Daha Fazla
You're missing < redirection, so correct command would be: sudo sed '/chefmaster/d' <./myhost1 >./myhost2 And it works. :-)
Dear, I have been working as a Test Engineer from past three years in a reputed organistaion and working for automation of telecom projects . I hope that my expereince will help you to sort out the script as earl Daha Fazla
i had managed to remove the line which contain the mentioned string: [login to view URL] localhost # The following lines are desirable for IPv6 capable hosts ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff Daha Fazla
Hi, The task you are asking help for is very basic in shell scripting and need not be offered more than 1$. I can do it for minimum amount. Regrads, Tarun dagar
I am a DevOps engineer with a lot of scripting experience. this project should not be an issue and I would be happy to have the opportunity to help you out. Please contact me if you would like to discuss details about Daha Fazla
hi, do you just want to remove all the lines containing 'chefmaster'? if not (e.g. only the first/nth occurrence), there's no simple sed one-liner and you are going to be looking at awk or handmade sh
Hi , Why you didn't remove the line manually on the file with vi or nano ? Do you need absolutely to use sed ? Best regards,
Experienced devops engineer + sysadmin here. Could help you with this in no time :) Hoping to hear back from you soon!
Hi, I can do shell scripting and have good knowledge of editing files through shell script. Hire me If you need a quick solution which is 100% working. Regards, Sriram