Announcement

Collapse
No announcement yet.

Help with unix commands

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    Enjoy Hull...some of us are having to spend more time in Grimsby. It makes you appreciate the place
    Speaking of Erith:

    "It's not twinned with anywhere, but it does have a suicide pact with Dagenham" - Linda Smith

    Comment


    • #17
      kaak@kaak.net>I commaaand youu to obeyyy they woord of the Lord, which tells you to CHANGE DIRECTORY!

      There are soem more basic commands, so what do you need?
      In da butt.
      "Do not worry if others do not understand you. Instead worry if you do not understand others." - Confucius
      THE UNDEFEATED SUPERCITIZEN w:4 t:2 l:1 (DON'T ASK!)
      "God is dead" - Nietzsche. "Nietzsche is dead" - God.

      Comment


      • #18
        Well, it was inevitable, I decided to start testing these regexes...

        $ cat databook
        0:04:01:10:wh00t
        0:10:12:05:l33t-2003
        0:01:01:01:666
        0:04:15:11:324
        0:04:15:12:k3wl

        $ sed -n '/^[^:]*:[^:]*:[^:]*:11/p' databook
        0:04:15:11:324

        This one prints November's records, as it's supposed to...

        $ sed -n '/^[^:]*:[^:]*:[^:]*:\(11\)\|\(12\)/p' databook
        0:10:12:05:l33t-2003
        0:04:15:11:324
        0:04:15:12:k3wl

        I'l figure out why this one produces wrong results later, if I can be bothered... (it probably picks up the 12 in the third column for some reason)

        $ sed -n '/^[^:]*:[^:]*:[^:]*:1[12]/p' databook
        0:04:15:11:324
        0:04:15:12:k3wl

        This one does exactly what it's supposed to do.

        $ sed -n '/^(.*?{3}1[12]/p' databook

        And this one doesn't seem to do anything... however, a fixed version of it does:

        $ sed -n '/^\(.*:\)\{3\}1[12]/p' databook
        0:04:15:11:324
        0:04:15:12:k3wl

        As does a version that might be safer, or then not, I'm not really sure:

        $ sed -n '/^\([^:]*:\)\{3\}1[12]/p' databook
        0:04:15:11:324
        0:04:15:12:k3wl

        No, I for one have not understood sed's rules about what needs to be escaped and what not in regexes...
        This is Shireroth, and Giant Squid will brutally murder me if I ever remove this link from my signature | In the end it won't be love that saves us, it will be mathematics | So many people have this concept of God the Avenger. I see God as the ultimate sense of humor -- SlowwHand

        Comment


        • #19
          You're all such a bunch of nerds...
          Speaking of Erith:

          "It's not twinned with anywhere, but it does have a suicide pact with Dagenham" - Linda Smith

          Comment


          • #20
            I'm almost ashamed about the acts of l33tism I committed. I guess I've picked it up at the Gentoo forums where the user levels are in l33t, probably (hopefully) as a joke...
            This is Shireroth, and Giant Squid will brutally murder me if I ever remove this link from my signature | In the end it won't be love that saves us, it will be mathematics | So many people have this concept of God the Avenger. I see God as the ultimate sense of humor -- SlowwHand

            Comment


            • #21
              What is l33t?
              "I work in IT so I'd be buggered without a computer" - Words of wisdom from Provost Harrison
              "You can be wrong AND jewish" - Wiglaf :love:

              Comment


              • #22
                Very, very sad Whaleboy, very, very sad. You've proven your credibility by not knowing what it is
                Speaking of Erith:

                "It's not twinned with anywhere, but it does have a suicide pact with Dagenham" - Linda Smith

                Comment


                • #23
                  He's just playing dumb Rich.
                  (\__/) 07/07/1937 - Never forget
                  (='.'=) "Claims demand evidence; extraordinary claims demand extraordinary evidence." -- Carl Sagan
                  (")_(") "Starting the fire from within."

                  Comment


                  • #24
                    ^\([^:]*:\)\{3\}1[12] would be safer than ^\(.*:\)\{3\}1[12], but something can be said for using unsafe REs as an input debugging tool; does sed not know about non-greedy matching?

                    I think I'll stick to Perl. Oh, yes.

                    SP
                    I got the Jete from C.C. Sabathia. : Jon Miller

                    Comment


                    • #25
                      ([3^4]*1:2(4)])$^¨b12
                      Eventis is the only refuge of the spammer. Join us now.
                      Long live teh paranoia smiley!

                      Comment


                      • #26
                        Sicko.

                        SP
                        I got the Jete from C.C. Sabathia. : Jon Miller

                        Comment

                        Working...
                        X