1 2 Previous Next 19 Replies Latest reply on Nov 24, 2016 4:26 AM by Olivier Renault

    sed question

    Olivier Renault

      Hi,
      I want to add a new line with sed but I can't:

      TODAY=14112016
      echo "CECI EST UN FICHIER" >/tmp/toto.txt
      echo "FIN DU FICHIER" >>/tmp/toto.txt

      how can I add a new line using sed in /tmp/toto.txt containing "AJOUT D UN COMMENTAIRE 14112016" as the second line (with the variable $TODAY)?

      I want this file :

      CECI EST UN FICHIER

      AJOUT D UN COMMENTAIRE 14112016

      FIN DU FICHIER

        1 2 Previous Next