<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <font size="-1"><font face="Arial">Concer<font size="-1">ning
          escaping the <font size="-1">co<font size="-1">lon: </font></font></font>I
        still have the thinnest possible understanding of the finer
        points of sed and the subs<font size="-1">titution syntax,
          especially <font size="-1">about escaping special
            characters.  I don't even know if the backsla<font size="-1">sh
              would go before or after the colon!</font><br>
            <br>
            <font size="-1">But I had wondered about the <font
                size="-1">possible effect of </font>that colon myself.</font><br>
            <br>
            <font size="-1">I ran a modified version of your suggested
              test, replacing the colon with a space<font size="-1">:<br>
                <br>
                <font size="-1">    sed -e 's/DEVICE/DEVICE Lubuntu1<font
                    size="-1"> </font>3551/'<br>
                  <br>
                  Now on the LTSP client, the resulting line is:<br>
                  <font size="-1"><br>
                    <font size="-1">    DEVICE Lubuntu1:3551 Lubuntu1
                      3551<br>
                      <br>
                      <font size="-1">------------------<br>
                        <br>
                        <font size="-1">I also tried </font><br>
                      </font><br>
                      <font size="-1">    sed -e 's/DEVICE$/DEVICE
                        Lubuntu1:<font size="-1">3</font>551/'</font><br>
                      <br>
                      <font size="-1">And that had no effect whatsoever<font
                          size="-1">.  <font size="-1">The result was
                            still "</font></font></font></font></font></font></font></font></font></font></font></font><font
      size="-1"><font face="Arial"><font size="-1"><font size="-1"><font
              size="-1"><font size="-1"><font size="-1"><font size="-1"><font
                      size="-1"><font size="-1"><font size="-1"><font
                            size="-1"><font size="-1"><font face="Arial"><font
                                  size="-1"><font size="-1"><font
                                      size="-1"><font size="-1"><font
                                          size="-1"><font size="-1"><font
                                              size="-1">DEVICE
                                              Lubuntu1:3551 Lubuntu1<font
                                                size="-1">:</font>3551<font
                                                size="-1">"</font></font></font></font></font></font></font></font></font></font></font></font></font>.<br>
                      <br>
                      <font size="-1">------------------<br>
                        <br>
                        <font size="-1">My curre<font size="-1">nt
                            thought is this<font size="-1">: I think the
                              LTSP clients use <font size="-1">a static<font
                                  size="-1">, read-only network boot
                                  image + a writable union filesystem
                                  overlaying the read-only image.  I
                                  have seen only the slimmest mention of
                                  it in writing<font size="-1">,
                                    however.  Perhaps I'm not searching
                                    with the <font size="-1">right ter<font
                                        size="-1">ms<font size="-1"> to
                                          find better documentation.  <font
                                            size="-1">But if that
                                            overlay has persisten<font
                                              size="-1">ce, then perhaps
                                              there could be results
                                              like the above.  As
                                              someone suggested earlier,
                                              it's as if the script had
                                              been run twice.  Well
                                              perhaps it is being run
                                              multiple times over
                                              succeeding boots and being
                                              applied to a persistent
                                              overl<font size="-1">ay.<br>
                                                <br>
                                                <font size="-1">I tried
                                                  earlier to copy an
                                                  alternative version of
                                                  the whole config file
                                                </font>in the script
                                                instead of using sed,
                                                and that failed, but I'm
                                                going to try that
                                                again.  If it works, I
                                                think it would overcome
                                                <font size="-1">a
                                                  persistent-overlay
                                                  behavior with sed.<br>
                                                  <br>
                                                  <font size="-1">And
                                                    I'll try my
                                                    persistent-overlay
                                                    theory with the LTSP
                                                    list fol<font
                                                      size="-1">ks. 
                                                      They are the ones
                                                      who should know
                                                      about that.</font></font><br>
                                                </font></font></font></font></font></font></font></font></font></font></font></font></font></font><br>
                      <br>
                    </font></font></font></font></font></font></font></font></font>
    <div class="moz-cite-prefix">On 12/19/2012 5:31 PM, ∅ wrote:<br>
    </div>
    <blockquote
cite="mid:CAFe_ewjN7v8qNrQz8YHtn1NPod-3YOyhzarP=nPyQyObWppFWw@mail.gmail.com"
      type="cite">
      <p>If you escape the colon with a backslash does that fix it? A
        colon is a potential delimiter although that seems to be
        unexpected output regardless. </p>
      <p>wxl</p>
      <div class="gmail_quote">On Dec 19, 2012 2:27 PM, "Jonathan
        Marsden" <<a moz-do-not-send="true"
          href="mailto:jmarsden@fastmail.fm">jmarsden@fastmail.fm</a>>
        wrote:<br type="attribution">
        <blockquote class="gmail_quote" style="margin:0 0 0
          .8ex;border-left:1px #ccc solid;padding-left:1ex">
          John,<br>
          <br>
          On 12/19/2012 01:16 PM, John Hupp wrote:<br>
          <br>
          >>> It all works fine except for this substitution:<br>
          >>> -e 's/DEVICE/DEVICE Lubuntu1:3551/'<br>
          <br>
          If the original line concerned starts out as just DEVICE
          (followed by a<br>
          line feed to mark the end of line), then I'd suggest making
          the sed<br>
          command be<br>
          <br>
            sed -e 's/DEVICE$/DEVICE Lubuntu1:5551/'<br>
          <br>
          So that, even if run twice, the second run will have no effect
          on this line.<br>
          <br>
          If there *is* "other junk" after DEVICE before the end of the
          line, and<br>
          there is only one line containing DEVICE in the file
          concerned, you<br>
          could consider<br>
          <br>
            sed -e 's/DEVICE.*$/DEVICE Lubuntu1:3551/'<br>
          <br>
          which would remove any trailing junk after DEVICE and replace
          it with<br>
          the desired string.<br>
          <br>
          Jonathan<br>
          <br>
          <br>
          --<br>
          Lubuntu-users mailing list<br>
          <a moz-do-not-send="true"
            href="mailto:Lubuntu-users@lists.ubuntu.com">Lubuntu-users@lists.ubuntu.com</a><br>
          Modify settings or unsubscribe at: <a moz-do-not-send="true"
href="https://lists.ubuntu.com/mailman/listinfo/lubuntu-users"
            target="_blank">https://lists.ubuntu.com/mailman/listinfo/lubuntu-users</a><br>
        </blockquote>
      </div>
    </blockquote>
    <br>
  </body>
</html>