Identi.ca Identi.ca
  • Login
  • Public

    • Public
    • Groups
    • Featured
    • Popular

michaelmcd's home timeline

Notices

  1. Command Line Magic Command Line Magic

    The "line" command comes with util-linux on my machine, so I guess some of you may not have that command. Sorry.

    about an hour ago from Net::Twitter
    • Command Line Magic Command Line Magic

      command line <<<magic # Not that it does much, but this command actually runs without error in BASH at least. ;-)

      about an hour ago from Net::Twitter
      • Command Line Magic Command Line Magic

        chkconfig --list | grep 3:on # Check what services are setup to start up in run level 3 on a Red Hat based system.

        about 3 hours ago from Net::Twitter
        • Command Line Magic Command Line Magic

          sed sentence<<<commented # This is another "alternate demarcation" example that is just a word and produced another word (commenced)

          about 3 hours ago from Net::Twitter
          • Command Line Magic Command Line Magic

            sed s/a/emen/<<<dated # That last one may not have been obvious but its basically the same as doing this.

            about 3 hours ago from Net::Twitter
            • Command Line Magic Command Line Magic

              sed statement<<<dated # Cool & useful. sed allows you to use other characters to demarcate sections. In this case, 't'. Thx @brimston3

              about 6 hours ago from Net::Twitter
              • Command Line Magic Command Line Magic

                http://bit.ly/LNM2Hr # An interesting interview with Stephen Bourne, creator of sh. Great historical insight.

                about 7 hours ago from Net::Twitter
                • Remote profile options...
                  Kevin Granade Kevin Granade

                  I love those interviews, I'm really thankful to computerworkd for doing them.

                  about 7 hours ago
                • Remote profile options...
                  Kevin Granade Kevin Granade

                  "I have used Bash myself because I run a Linux/Gnu system at home and it appears to do what I would expect." -Steve Bourne #quote

                  about 7 hours ago
                • Remote profile options...
                  Kevin Granade Kevin Granade

                  Something that crossed my mind while reading about performance in sh, is there a lint-like program for {ba,c,k,z}?sh ?

                  about 7 hours ago
              • Command Line Magic Command Line Magic

                "Loose bits sink chips" -fortune

                about 9 hours ago from Net::Twitter
                • Command Line Magic Command Line Magic

                  echo $(($(ssh REMOTEHOST date +%s) - $(date +%s))) # Tell me how many seconds a server's clock is off compared to localhost. Thx @msquadrat

                  about a day ago from Net::Twitter
                  • Command Line Magic Command Line Magic

                    last reboot # See the last several times your system was rebooted. Reboot == that thing you do once in a while for kernel upgrades.

                    about 2 days ago from Net::Twitter
                    • Carlos Solís Carlos Solís

                      @climagic ...unless you have a bill to pay and a desktop computer.

                      about 2 days ago
                  • Command Line Magic Command Line Magic

                    fgrep 28/May/2012 access_log | awk '$1~/\.[a-z][a-z]$/{print $6 " " $7}' # For May 28th, print the req fields for hosts from two letter gTLD

                    about 2 days ago from Net::Twitter
                    • Command Line Magic Command Line Magic

                      tmux split top # Start "top" in a split window inside your current #tmux session. You can even do this remotely or from the tmux cmd prompt.

                      about 2 days ago from Net::Twitter
                      • Command Line Magic Command Line Magic Rafael SDM Sierra

                        echo "export LIBOVERLAY_SCROLLBAR=0" >> ~/.xprofile # Logout/Login required. Will give you back your scrollbars in Ubuntu. Thx @rafaelsdm

                        about 2 days ago from Net::Twitter
                        • Command Line Magic Command Line Magic

                          printf "$( cat /sys/class/power_supply/BAT?/{voltage,current}_now) * 10 12 ^ 3 k / p" |dc # Show battery power drain (linux) Thx @telent_net

                          about 2 days ago from Net::Twitter
                          • Command Line Magic Command Line Magic

                            http://ur1.ca/9elqi # CLIMagic 2012 Survey results are out. Everyone is special in some way.

                            about 3 days ago from Net::Twitter
                            • zinayto repeated this.
                          • Command Line Magic Command Line Magic

                            The reason I do it this way is because the cut command can't be used with 'tail -f' like this due to output buffering issues.

                            about 3 days ago from Net::Twitter
                            • Command Line Magic Command Line Magic

                              In that last one, I needed the $COLUMNS variable from bash, but the $0 from awk, so by using "", I let the $COLUMNS through and backslash ..

                              about 3 days ago from Net::Twitter
                              • Command Line Magic Command Line Magic

                                means that it will pass a literal $ to awk and thus use awk's $0, which means the whole line.

                                about 3 days ago from Net::Twitter
                                • Command Line Magic Command Line Magic

                                  tail -f log |awk "{print substr(\$0,0,$COLUMNS)}" # Cut log to width of your term. Note use of quotes. COLUMNS is BASH variable.

                                  about 3 days ago from Net::Twitter
                                  • Command Line Magic Command Line Magic

                                    Happy CLI Day 2012! http://ur1.ca/9eijs

                                    about 3 days ago from Net::Twitter
                                    • Carlos Solís likes this.
                                    • Ankur Sinha and Carlos Solís repeated this.
                                    • Sander Sander

                                      Happy CLI Day 2012! http://ur1.ca/9eijs

                                      about 3 days ago
                                  • Before

                                  Site notice

                                  • API
                                  • Status

                                  Feeds

                                  • Activity Streams
                                  • RSS 1.0
                                  • RSS 2.0
                                  • Atom
                                  • Help
                                  • About
                                  • FAQ
                                  • TOS
                                  • Privacy
                                  • Source
                                  • Version
                                  • Contact

                                  Identi.ca is a microblogging service brought to you by Status.net. It runs the StatusNet microblogging software, version 1.1.0-alpha1, available under the GNU Affero General Public License.

                                  Creative Commons Attribution 3.0 All Identi.ca content and data are available under the Creative Commons Attribution 3.0 license.

                                  Switch to mobile site layout.

                                  Built in Montreal