Script with Sed to delete a selective line in a file

  • Durum Tamamlandı
  • Bütçe $10 - $30 USD
  • Toplam Teklif Sayısı 3

Proje Açıklaması

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 ?

Buna benzer bir proje için ücretsiz teklifler alın
Tamamlayan:
Gerekli Beceriler

Biraz para kazanmak mı istiyorsunuz?

  • Bütçenizi ve zaman çerçevesini belirleyin
  • Teklifinizin dış hatlarını verin
  • Çalışmanız için ödeme alın

Bu projeye de teklif veren Freelancerları işe alın

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