Cancelado

Simple UNIX Script fix - remove 1 line from file

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 ?

127.0.0.1 localhost

# The following lines are desirable for IPv6 capable hosts

::1 ip6-localhost ip6-loopback

fe00::0 ip6-localnet

ff00::0 ip6-mcastprefix

ff02::1 ip6-allnodes

ff02::2 ip6-allrouters

ff02::3 ip6-allhosts

[url removed, login to view] [url removed, login to view] chefnode

[url removed, login to view] [url removed, login to view] chefmaster

Habilidades: Shell Script, UNIX

Veja mais: simple file watcher unix script, linux script remove line file perl, remove line file script, linux, shell script, system admin, script remove line file, shell script append file remove line, shell script remove line file, shell remove line file, shell script delete line file, file handling unix script, find delete line file shell script, shell script delete add line file, shell script add line file, remove single line file shell scripting, shell script remove single line file, compare file remove lines shelll script

Acerca do Empregador:
( 49 comentários ) Lyndhurst, United States

ID do Projeto: #13335308

25 freelancers estão ofertando em média $21 para esse trabalho

dkokmadis

A proposal has not yet been provided

$25 USD em 1 dia
(17 Comentários)
4.1
pauldj

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

$100 USD em 1 dia
(5 Comentários)
3.5
srinichal

ready to deliver

$15 USD in 2 dias
(8 Comentários)
3.7
versacode

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 Mais

$15 USD em 1 dia
(2 Comentários)
3.2
$15 USD em 1 dia
(5 Comentários)
2.4
ignaciorodrguez

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 Mais

$30 USD em 1 dia
(3 Comentários)
1.8
jperusan

You're missing < redirection, so correct command would be: sudo sed '/chefmaster/d' <./myhost1 >./myhost2 And it works. :-)

$10 USD em 1 dia
(1 Comentário)
1.0
nareshreddy1310

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 Mais

$13 USD em 1 dia
(0 Comentários)
0.0
muhammadmomon

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 Mais

$10 USD em 1 dia
(0 Comentários)
0.0
$10 USD em 1 dia
(0 Comentários)
0.0
tarundagar

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

$10 USD em 1 dia
(0 Comentários)
0.0
taxthelm

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 Mais

$15 USD em 1 dia
(0 Comentários)
0.0
ubica

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

$25 USD em 1 dia
(0 Comentários)
0.0
vinaybsv

A proposal has not yet been provided

$10 USD em 1 dia
(0 Comentários)
0.0
Aydo1040

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,

$15 USD em 1 dia
(0 Comentários)
0.0
sahilnarain

Experienced devops engineer + sysadmin here. Could help you with this in no time :) Hoping to hear back from you soon!

$30 USD em 1 dia
(0 Comentários)
0.0
pasagadisriram

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

$15 USD em 1 dia
(0 Comentários)
0.0
$30 USD em 1 dia
(0 Comentários)
0.0
$25 USD em 1 dia
(0 Comentários)
0.0
johnerramirez

A proposal has not yet been provided

$30 USD em 1 dia
(0 Comentários)
0.0