Script with Sed to delete a selective line in a file

  • Status Concluído
  • Budget $10 - $30 USD
  • Total Bids 3

Descrição do Projeto

Here is my script

ubuntu@chefnode7:~$ cat [url removed, login to view]

#!/bin/bash

echo "###############################################################################"

echo "Setting Entry in /etc/hosts v3 "

echo "###############################################################################"

echo "passed.....$1"

echo "passed.....$2"

echo "passed.....$3"

echo "passed.....$4"

echo "passed.....$5"

echo "passed.....$6"

myentry="$1 $3 $2"

mychef="$4 $6 $5"

echo "myentry....$myentry"

sudo chmod 777 /etc/hosts

sudo sed [url removed, login to view] '/$3/d' /etc/hosts # this line does not work

sudo sed [url removed, login to view] '/$6/d' /etc/hosts # this line does not work

sudo echo $myentry >> /etc/hosts

sudo echo $mychef>> /etc/hosts

sudo chmod 644 /etc/hosts

sudo cat /etc/hosts

# end of file

echo "pass: ip fqdn node ip cheffqdn chefnode"

ubuntu@chefnode7:~$

This is something that I need ASAP - only accept if you can do this right now and IM me?

We can work together and have a webex? Please note I will pay promptly and leave 5 stars for the project to help me with SYNTAX asap please ?

Obter orçamentos grátis para um projeto como este
Concluído por:
Habilidades Requeridas

Pretende fazer algum dinheiro?

  • Definir seu orçamento e prazo
  • Esboce sua proposta
  • Seja pago por seu trabalho

Contratar freelancers que também ofereça neste projeto

    • Forbes
    • The New York Times
    • Time
    • Wall Street Journal
    • Times Online