sed - How do I match this pattern?












0














I'm using sed and I am having trouble finding out how to remove some of the first line of text from each block. Here is my original data:



  "s220823vaps2512":   {
"hostname": "s220823vaps2512",
"description": data",
"type": "Virtual",
"os": "data",
"idc": "data",
"environment": "data",
"deviceclass": "data",
"cores": "data",
"memory": "data",
"frontnet": "data",
"ipset": {
"backnet": "data",
"storagenet": "data",
"metroclusternet": "data"
},
"roles": "data",
"mounts": "data"
},
"s220823vaps2513": {
"hostname": "s220823vaps2513",
"description": "data",
"type": "Virtual",
"os": "data",
"idc": "data",
"environment": "data",
"deviceclass": "data",
"cores": "data",
"memory": "data",
"frontnet": "data",
"ipset": {
"backnet": "data",
"storagenet": "data",
"metroclusternet": "data"
},


I want to use sed to successfully remove everything up until the { on the first line of each block leaving me with a data format similar to



{
"hostname": "data",
"etc": "etc",
},
{
"hostname": "data",
"etc": "etc",
},









share|improve this question




















  • 1




    Looks like JSON. Is it? If so, use a JSON parser. It's much much better that way.
    – Sobrique
    Oct 20 '15 at 9:12
















0














I'm using sed and I am having trouble finding out how to remove some of the first line of text from each block. Here is my original data:



  "s220823vaps2512":   {
"hostname": "s220823vaps2512",
"description": data",
"type": "Virtual",
"os": "data",
"idc": "data",
"environment": "data",
"deviceclass": "data",
"cores": "data",
"memory": "data",
"frontnet": "data",
"ipset": {
"backnet": "data",
"storagenet": "data",
"metroclusternet": "data"
},
"roles": "data",
"mounts": "data"
},
"s220823vaps2513": {
"hostname": "s220823vaps2513",
"description": "data",
"type": "Virtual",
"os": "data",
"idc": "data",
"environment": "data",
"deviceclass": "data",
"cores": "data",
"memory": "data",
"frontnet": "data",
"ipset": {
"backnet": "data",
"storagenet": "data",
"metroclusternet": "data"
},


I want to use sed to successfully remove everything up until the { on the first line of each block leaving me with a data format similar to



{
"hostname": "data",
"etc": "etc",
},
{
"hostname": "data",
"etc": "etc",
},









share|improve this question




















  • 1




    Looks like JSON. Is it? If so, use a JSON parser. It's much much better that way.
    – Sobrique
    Oct 20 '15 at 9:12














0












0








0







I'm using sed and I am having trouble finding out how to remove some of the first line of text from each block. Here is my original data:



  "s220823vaps2512":   {
"hostname": "s220823vaps2512",
"description": data",
"type": "Virtual",
"os": "data",
"idc": "data",
"environment": "data",
"deviceclass": "data",
"cores": "data",
"memory": "data",
"frontnet": "data",
"ipset": {
"backnet": "data",
"storagenet": "data",
"metroclusternet": "data"
},
"roles": "data",
"mounts": "data"
},
"s220823vaps2513": {
"hostname": "s220823vaps2513",
"description": "data",
"type": "Virtual",
"os": "data",
"idc": "data",
"environment": "data",
"deviceclass": "data",
"cores": "data",
"memory": "data",
"frontnet": "data",
"ipset": {
"backnet": "data",
"storagenet": "data",
"metroclusternet": "data"
},


I want to use sed to successfully remove everything up until the { on the first line of each block leaving me with a data format similar to



{
"hostname": "data",
"etc": "etc",
},
{
"hostname": "data",
"etc": "etc",
},









share|improve this question















I'm using sed and I am having trouble finding out how to remove some of the first line of text from each block. Here is my original data:



  "s220823vaps2512":   {
"hostname": "s220823vaps2512",
"description": data",
"type": "Virtual",
"os": "data",
"idc": "data",
"environment": "data",
"deviceclass": "data",
"cores": "data",
"memory": "data",
"frontnet": "data",
"ipset": {
"backnet": "data",
"storagenet": "data",
"metroclusternet": "data"
},
"roles": "data",
"mounts": "data"
},
"s220823vaps2513": {
"hostname": "s220823vaps2513",
"description": "data",
"type": "Virtual",
"os": "data",
"idc": "data",
"environment": "data",
"deviceclass": "data",
"cores": "data",
"memory": "data",
"frontnet": "data",
"ipset": {
"backnet": "data",
"storagenet": "data",
"metroclusternet": "data"
},


I want to use sed to successfully remove everything up until the { on the first line of each block leaving me with a data format similar to



{
"hostname": "data",
"etc": "etc",
},
{
"hostname": "data",
"etc": "etc",
},






sed






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 1 hour ago









Rui F Ribeiro

39.2k1479130




39.2k1479130










asked Oct 20 '15 at 7:02









CMS

1




1








  • 1




    Looks like JSON. Is it? If so, use a JSON parser. It's much much better that way.
    – Sobrique
    Oct 20 '15 at 9:12














  • 1




    Looks like JSON. Is it? If so, use a JSON parser. It's much much better that way.
    – Sobrique
    Oct 20 '15 at 9:12








1




1




Looks like JSON. Is it? If so, use a JSON parser. It's much much better that way.
– Sobrique
Oct 20 '15 at 9:12




Looks like JSON. Is it? If so, use a JSON parser. It's much much better that way.
– Sobrique
Oct 20 '15 at 9:12










3 Answers
3






active

oldest

votes


















2














This answer is predicated on the above looking rather a lot like JSON, so I've therefore assumed it probably is JSON. But it's incomplete in your sample, which I have also assumed is a typo. If this isn't the case... well, you already have sed answers.



Please - don't use a regex to parse JSON. It's nasty. regex is bad at recursive tagged data types like JSON/XML. It's at best a dirty hack which creates brittle code in future.



Similarly - JSON is important that it be complete - I've had to guess how your full JSON looks.



Assuming JSON like this (used http://jsonlint.com/ to tidy up the elements)



{
"s220823vaps2512": {
"hostname": "s220823vaps2512",
"description": "data",
"type": "Virtual",
"os": "data",
"idc": "data",
"environment": "data",
"deviceclass": "data",
"cores": "data",
"memory": "data",
"frontnet": "data",
"ipset": {
"backnet": "data",
"storagenet": "data",
"metroclusternet": "data"
},
"roles": "data",
"mounts": "data"
},
"s220823vaps2513": {
"hostname": "s220823vaps2513",
"description": "data",
"type": "Virtual",
"os": "data",
"idc": "data",
"environment": "data",
"deviceclass": "data",
"cores": "data",
"memory": "data",
"frontnet": "data",
"ipset": {
"backnet": "data",
"storagenet": "data",
"metroclusternet": "data"
}
}
}


Then the way to just get the bits you want:



#!/usr/bin/env perl
use strict;
use warnings;

use JSON;

my $input = ### as above, snipped for brevity.

#decode/validated
my $json = decode_json ( $input );
#create new JSON array of elements.
my $new_json = [map { $json -> {$_} } keys %$json];
#print it out.
print to_json ( $new_json, { pretty => 1, canonical => 1 } );


And in this way, you create valid JSON output as well as handling cases where e.g. key ordering is different (which is entirely valid in JSON).






share|improve this answer





























    0














    Simple with sed:



    sed 's/^[^{]*{/{/' file



    • Just searches for lines starting with characters which are not { (^[^{]), zero or more times * followed by a {.

    • This all is replaced by a single {.


    Edit: If you want to exclude some patterns from being replace (for example the "ipset": line) use this:



    sed '/"ipset":/n;s/^[^{]*{/{/' file



    • If the line starts with "ipset":, continue with the next line n.






    share|improve this answer























    • Will this not effect the ipset data?
      – CMS
      Oct 20 '15 at 7:10










    • Yes it does, if you don't want that, you need something to identify the other lines: is there a similarity in that names: s220823vaps2513? s-digit-vaps-digit or so?
      – chaos
      Oct 20 '15 at 7:15










    • Yes the names are similar in each line, probably around 10 variants though
      – CMS
      Oct 20 '15 at 7:17










    • Additionally can we use sed to ignore the ipset line as this is the only line that it would effect?
      – CMS
      Oct 20 '15 at 7:18










    • Yes, see my edited answer.
      – chaos
      Oct 20 '15 at 7:23



















    0














    This seems to work, at least on the sample of data you provided:



    sed -'s/^ .*{/{/' file 


    It transforms the first line of each block "name" { (note the leading space) to just {






    share|improve this answer























      Your Answer








      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "106"
      };
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function() {
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled) {
      StackExchange.using("snippets", function() {
      createEditor();
      });
      }
      else {
      createEditor();
      }
      });

      function createEditor() {
      StackExchange.prepareEditor({
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: false,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: null,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      });


      }
      });














      draft saved

      draft discarded


















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f237329%2fsed-how-do-i-match-this-pattern%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      3 Answers
      3






      active

      oldest

      votes








      3 Answers
      3






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      2














      This answer is predicated on the above looking rather a lot like JSON, so I've therefore assumed it probably is JSON. But it's incomplete in your sample, which I have also assumed is a typo. If this isn't the case... well, you already have sed answers.



      Please - don't use a regex to parse JSON. It's nasty. regex is bad at recursive tagged data types like JSON/XML. It's at best a dirty hack which creates brittle code in future.



      Similarly - JSON is important that it be complete - I've had to guess how your full JSON looks.



      Assuming JSON like this (used http://jsonlint.com/ to tidy up the elements)



      {
      "s220823vaps2512": {
      "hostname": "s220823vaps2512",
      "description": "data",
      "type": "Virtual",
      "os": "data",
      "idc": "data",
      "environment": "data",
      "deviceclass": "data",
      "cores": "data",
      "memory": "data",
      "frontnet": "data",
      "ipset": {
      "backnet": "data",
      "storagenet": "data",
      "metroclusternet": "data"
      },
      "roles": "data",
      "mounts": "data"
      },
      "s220823vaps2513": {
      "hostname": "s220823vaps2513",
      "description": "data",
      "type": "Virtual",
      "os": "data",
      "idc": "data",
      "environment": "data",
      "deviceclass": "data",
      "cores": "data",
      "memory": "data",
      "frontnet": "data",
      "ipset": {
      "backnet": "data",
      "storagenet": "data",
      "metroclusternet": "data"
      }
      }
      }


      Then the way to just get the bits you want:



      #!/usr/bin/env perl
      use strict;
      use warnings;

      use JSON;

      my $input = ### as above, snipped for brevity.

      #decode/validated
      my $json = decode_json ( $input );
      #create new JSON array of elements.
      my $new_json = [map { $json -> {$_} } keys %$json];
      #print it out.
      print to_json ( $new_json, { pretty => 1, canonical => 1 } );


      And in this way, you create valid JSON output as well as handling cases where e.g. key ordering is different (which is entirely valid in JSON).






      share|improve this answer


























        2














        This answer is predicated on the above looking rather a lot like JSON, so I've therefore assumed it probably is JSON. But it's incomplete in your sample, which I have also assumed is a typo. If this isn't the case... well, you already have sed answers.



        Please - don't use a regex to parse JSON. It's nasty. regex is bad at recursive tagged data types like JSON/XML. It's at best a dirty hack which creates brittle code in future.



        Similarly - JSON is important that it be complete - I've had to guess how your full JSON looks.



        Assuming JSON like this (used http://jsonlint.com/ to tidy up the elements)



        {
        "s220823vaps2512": {
        "hostname": "s220823vaps2512",
        "description": "data",
        "type": "Virtual",
        "os": "data",
        "idc": "data",
        "environment": "data",
        "deviceclass": "data",
        "cores": "data",
        "memory": "data",
        "frontnet": "data",
        "ipset": {
        "backnet": "data",
        "storagenet": "data",
        "metroclusternet": "data"
        },
        "roles": "data",
        "mounts": "data"
        },
        "s220823vaps2513": {
        "hostname": "s220823vaps2513",
        "description": "data",
        "type": "Virtual",
        "os": "data",
        "idc": "data",
        "environment": "data",
        "deviceclass": "data",
        "cores": "data",
        "memory": "data",
        "frontnet": "data",
        "ipset": {
        "backnet": "data",
        "storagenet": "data",
        "metroclusternet": "data"
        }
        }
        }


        Then the way to just get the bits you want:



        #!/usr/bin/env perl
        use strict;
        use warnings;

        use JSON;

        my $input = ### as above, snipped for brevity.

        #decode/validated
        my $json = decode_json ( $input );
        #create new JSON array of elements.
        my $new_json = [map { $json -> {$_} } keys %$json];
        #print it out.
        print to_json ( $new_json, { pretty => 1, canonical => 1 } );


        And in this way, you create valid JSON output as well as handling cases where e.g. key ordering is different (which is entirely valid in JSON).






        share|improve this answer
























          2












          2








          2






          This answer is predicated on the above looking rather a lot like JSON, so I've therefore assumed it probably is JSON. But it's incomplete in your sample, which I have also assumed is a typo. If this isn't the case... well, you already have sed answers.



          Please - don't use a regex to parse JSON. It's nasty. regex is bad at recursive tagged data types like JSON/XML. It's at best a dirty hack which creates brittle code in future.



          Similarly - JSON is important that it be complete - I've had to guess how your full JSON looks.



          Assuming JSON like this (used http://jsonlint.com/ to tidy up the elements)



          {
          "s220823vaps2512": {
          "hostname": "s220823vaps2512",
          "description": "data",
          "type": "Virtual",
          "os": "data",
          "idc": "data",
          "environment": "data",
          "deviceclass": "data",
          "cores": "data",
          "memory": "data",
          "frontnet": "data",
          "ipset": {
          "backnet": "data",
          "storagenet": "data",
          "metroclusternet": "data"
          },
          "roles": "data",
          "mounts": "data"
          },
          "s220823vaps2513": {
          "hostname": "s220823vaps2513",
          "description": "data",
          "type": "Virtual",
          "os": "data",
          "idc": "data",
          "environment": "data",
          "deviceclass": "data",
          "cores": "data",
          "memory": "data",
          "frontnet": "data",
          "ipset": {
          "backnet": "data",
          "storagenet": "data",
          "metroclusternet": "data"
          }
          }
          }


          Then the way to just get the bits you want:



          #!/usr/bin/env perl
          use strict;
          use warnings;

          use JSON;

          my $input = ### as above, snipped for brevity.

          #decode/validated
          my $json = decode_json ( $input );
          #create new JSON array of elements.
          my $new_json = [map { $json -> {$_} } keys %$json];
          #print it out.
          print to_json ( $new_json, { pretty => 1, canonical => 1 } );


          And in this way, you create valid JSON output as well as handling cases where e.g. key ordering is different (which is entirely valid in JSON).






          share|improve this answer












          This answer is predicated on the above looking rather a lot like JSON, so I've therefore assumed it probably is JSON. But it's incomplete in your sample, which I have also assumed is a typo. If this isn't the case... well, you already have sed answers.



          Please - don't use a regex to parse JSON. It's nasty. regex is bad at recursive tagged data types like JSON/XML. It's at best a dirty hack which creates brittle code in future.



          Similarly - JSON is important that it be complete - I've had to guess how your full JSON looks.



          Assuming JSON like this (used http://jsonlint.com/ to tidy up the elements)



          {
          "s220823vaps2512": {
          "hostname": "s220823vaps2512",
          "description": "data",
          "type": "Virtual",
          "os": "data",
          "idc": "data",
          "environment": "data",
          "deviceclass": "data",
          "cores": "data",
          "memory": "data",
          "frontnet": "data",
          "ipset": {
          "backnet": "data",
          "storagenet": "data",
          "metroclusternet": "data"
          },
          "roles": "data",
          "mounts": "data"
          },
          "s220823vaps2513": {
          "hostname": "s220823vaps2513",
          "description": "data",
          "type": "Virtual",
          "os": "data",
          "idc": "data",
          "environment": "data",
          "deviceclass": "data",
          "cores": "data",
          "memory": "data",
          "frontnet": "data",
          "ipset": {
          "backnet": "data",
          "storagenet": "data",
          "metroclusternet": "data"
          }
          }
          }


          Then the way to just get the bits you want:



          #!/usr/bin/env perl
          use strict;
          use warnings;

          use JSON;

          my $input = ### as above, snipped for brevity.

          #decode/validated
          my $json = decode_json ( $input );
          #create new JSON array of elements.
          my $new_json = [map { $json -> {$_} } keys %$json];
          #print it out.
          print to_json ( $new_json, { pretty => 1, canonical => 1 } );


          And in this way, you create valid JSON output as well as handling cases where e.g. key ordering is different (which is entirely valid in JSON).







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Oct 20 '15 at 9:40









          Sobrique

          3,789518




          3,789518

























              0














              Simple with sed:



              sed 's/^[^{]*{/{/' file



              • Just searches for lines starting with characters which are not { (^[^{]), zero or more times * followed by a {.

              • This all is replaced by a single {.


              Edit: If you want to exclude some patterns from being replace (for example the "ipset": line) use this:



              sed '/"ipset":/n;s/^[^{]*{/{/' file



              • If the line starts with "ipset":, continue with the next line n.






              share|improve this answer























              • Will this not effect the ipset data?
                – CMS
                Oct 20 '15 at 7:10










              • Yes it does, if you don't want that, you need something to identify the other lines: is there a similarity in that names: s220823vaps2513? s-digit-vaps-digit or so?
                – chaos
                Oct 20 '15 at 7:15










              • Yes the names are similar in each line, probably around 10 variants though
                – CMS
                Oct 20 '15 at 7:17










              • Additionally can we use sed to ignore the ipset line as this is the only line that it would effect?
                – CMS
                Oct 20 '15 at 7:18










              • Yes, see my edited answer.
                – chaos
                Oct 20 '15 at 7:23
















              0














              Simple with sed:



              sed 's/^[^{]*{/{/' file



              • Just searches for lines starting with characters which are not { (^[^{]), zero or more times * followed by a {.

              • This all is replaced by a single {.


              Edit: If you want to exclude some patterns from being replace (for example the "ipset": line) use this:



              sed '/"ipset":/n;s/^[^{]*{/{/' file



              • If the line starts with "ipset":, continue with the next line n.






              share|improve this answer























              • Will this not effect the ipset data?
                – CMS
                Oct 20 '15 at 7:10










              • Yes it does, if you don't want that, you need something to identify the other lines: is there a similarity in that names: s220823vaps2513? s-digit-vaps-digit or so?
                – chaos
                Oct 20 '15 at 7:15










              • Yes the names are similar in each line, probably around 10 variants though
                – CMS
                Oct 20 '15 at 7:17










              • Additionally can we use sed to ignore the ipset line as this is the only line that it would effect?
                – CMS
                Oct 20 '15 at 7:18










              • Yes, see my edited answer.
                – chaos
                Oct 20 '15 at 7:23














              0












              0








              0






              Simple with sed:



              sed 's/^[^{]*{/{/' file



              • Just searches for lines starting with characters which are not { (^[^{]), zero or more times * followed by a {.

              • This all is replaced by a single {.


              Edit: If you want to exclude some patterns from being replace (for example the "ipset": line) use this:



              sed '/"ipset":/n;s/^[^{]*{/{/' file



              • If the line starts with "ipset":, continue with the next line n.






              share|improve this answer














              Simple with sed:



              sed 's/^[^{]*{/{/' file



              • Just searches for lines starting with characters which are not { (^[^{]), zero or more times * followed by a {.

              • This all is replaced by a single {.


              Edit: If you want to exclude some patterns from being replace (for example the "ipset": line) use this:



              sed '/"ipset":/n;s/^[^{]*{/{/' file



              • If the line starts with "ipset":, continue with the next line n.







              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited Oct 20 '15 at 7:39

























              answered Oct 20 '15 at 7:07









              chaos

              35.1k773116




              35.1k773116












              • Will this not effect the ipset data?
                – CMS
                Oct 20 '15 at 7:10










              • Yes it does, if you don't want that, you need something to identify the other lines: is there a similarity in that names: s220823vaps2513? s-digit-vaps-digit or so?
                – chaos
                Oct 20 '15 at 7:15










              • Yes the names are similar in each line, probably around 10 variants though
                – CMS
                Oct 20 '15 at 7:17










              • Additionally can we use sed to ignore the ipset line as this is the only line that it would effect?
                – CMS
                Oct 20 '15 at 7:18










              • Yes, see my edited answer.
                – chaos
                Oct 20 '15 at 7:23


















              • Will this not effect the ipset data?
                – CMS
                Oct 20 '15 at 7:10










              • Yes it does, if you don't want that, you need something to identify the other lines: is there a similarity in that names: s220823vaps2513? s-digit-vaps-digit or so?
                – chaos
                Oct 20 '15 at 7:15










              • Yes the names are similar in each line, probably around 10 variants though
                – CMS
                Oct 20 '15 at 7:17










              • Additionally can we use sed to ignore the ipset line as this is the only line that it would effect?
                – CMS
                Oct 20 '15 at 7:18










              • Yes, see my edited answer.
                – chaos
                Oct 20 '15 at 7:23
















              Will this not effect the ipset data?
              – CMS
              Oct 20 '15 at 7:10




              Will this not effect the ipset data?
              – CMS
              Oct 20 '15 at 7:10












              Yes it does, if you don't want that, you need something to identify the other lines: is there a similarity in that names: s220823vaps2513? s-digit-vaps-digit or so?
              – chaos
              Oct 20 '15 at 7:15




              Yes it does, if you don't want that, you need something to identify the other lines: is there a similarity in that names: s220823vaps2513? s-digit-vaps-digit or so?
              – chaos
              Oct 20 '15 at 7:15












              Yes the names are similar in each line, probably around 10 variants though
              – CMS
              Oct 20 '15 at 7:17




              Yes the names are similar in each line, probably around 10 variants though
              – CMS
              Oct 20 '15 at 7:17












              Additionally can we use sed to ignore the ipset line as this is the only line that it would effect?
              – CMS
              Oct 20 '15 at 7:18




              Additionally can we use sed to ignore the ipset line as this is the only line that it would effect?
              – CMS
              Oct 20 '15 at 7:18












              Yes, see my edited answer.
              – chaos
              Oct 20 '15 at 7:23




              Yes, see my edited answer.
              – chaos
              Oct 20 '15 at 7:23











              0














              This seems to work, at least on the sample of data you provided:



              sed -'s/^ .*{/{/' file 


              It transforms the first line of each block "name" { (note the leading space) to just {






              share|improve this answer




























                0














                This seems to work, at least on the sample of data you provided:



                sed -'s/^ .*{/{/' file 


                It transforms the first line of each block "name" { (note the leading space) to just {






                share|improve this answer


























                  0












                  0








                  0






                  This seems to work, at least on the sample of data you provided:



                  sed -'s/^ .*{/{/' file 


                  It transforms the first line of each block "name" { (note the leading space) to just {






                  share|improve this answer














                  This seems to work, at least on the sample of data you provided:



                  sed -'s/^ .*{/{/' file 


                  It transforms the first line of each block "name" { (note the leading space) to just {







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Oct 20 '15 at 7:43

























                  answered Oct 20 '15 at 7:24









                  cas

                  38.7k452100




                  38.7k452100






























                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to Unix & Linux Stack Exchange!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.





                      Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                      Please pay close attention to the following guidance:


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f237329%2fsed-how-do-i-match-this-pattern%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      CARDNET

                      Boot-repair Failure: Unable to locate package grub-common:i386

                      濃尾地震