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/'
| //#define VERBOSE | |
| /* *************************************************************************** | |
| Copyright 2011 Calvin Rien | |
| (http://the.darktable.com) | |
| Licensed under the Apache License, Version 2.0 (the "License"); | |
| you may not use this file except in compliance with the License. | |
| You may obtain a copy of the License at | |
| http://www.apache.org/licenses/LICENSE-2.0 |
| rm $(ls * | grep -v 'EditorBuildSettings.asset\|InputManager.asset\|ProjectSettings.asset\|QualitySettings.asset\|TagManager.asset\|TimeManager.asset\|AudioManager.asset\|DynamicsManager.asset\|NetworkManager.asset') |
| {"frames": { | |
| {% for sprite in spritesAndAliases %} | |
| "{{ sprite.name }}": | |
| { | |
| "frame": {"x":{{ sprite.textureRectX }},"y":{{ sprite.textureRectY }},"w":{{ sprite.textureRectWidth }},"h":{{ sprite.textureRectHeight }}}, | |
| "rotated": {% if sprite.isRotated %}true{% else %}false{% /if %}, | |
| "trimmed": {% if sprite.isTrimmed %}true{% else %}false{% /if %}, | |
| "spriteSourceSize": {"x":0,"y":0,"w":{{ sprite.sourceSizeWidth }},"h":{{ sprite.sourceSizeHeight }}}, | |
| "sourceSize": {"w":{{ sprite.sourceSizeWidth }},"h":{{ sprite.sourceSizeHeight }}}, | |
| "spriteColorRect": {"x":{{ sprite.sourceColorRectX }},"y":{{ sprite.sourceColorRectY }},"w":{{ sprite.sourceColorRectWidth }},"h":{{ sprite.sourceColorRectHeight }}}, |
| import aurelienribon.tweenengine.Tween; | |
| import aurelienribon.tweenengine.TweenAccessor; | |
| import com.unhappyrobot.entities.GameObject; | |
| public class GameObjectAccessor implements TweenAccessor<GameObject> { | |
| static { | |
| Tween.registerAccessor(GameObject.class, new GameObjectAccessor()); | |
| } | |
| public static final int POSITION = 1; |
| ;; This buffer is for notes you don't want to save, and for Lisp evaluation. | |
| ;; If you want to create a file, visit that file with C-x C-f, | |
| ;; then enter the text in that file's own buffer. | |
| /Applications/Unity/Unity.app/Contents/MacOS/Unity \ | |
| -batchmode \ | |
| -quit \ | |
| -projectPath $PROJECT_PATH \ | |
| -executeMethod CommandBuild.BuildiOS |
| syntax: glob | |
| .DS_Store | |
| *.sln | |
| *.userprefs | |
| *.csproj | |
| *.pidb | |
| *.unitypackage | |
| syntax: regexp | |
| ^Build/.* |
| Homebrew (https://github.com/mxcl/homebrew/wiki/installation) | |
| brew install postgres | |
| brew install gdal --with-postgres (EDIT THE FORMULA FIRST, see https://github.com/mxcl/homebrew/issues/8301) | |
| brew install postgis | |
| edit /etc/paths to put /usr/local/bin on top, so that lion's psql doesnt win | |
| PostGIS templates (based on https://wiki.archlinux.org/index.php/PostGIS) | |
| createdb template_postgis -E UTF8 | |
| createlang plpgsql template_postgis | |
| psql -d template_postgis -f /usr/local/share/postgis/postgis.sql |
| // Basic Unity Editor Window | |
| using UnityEngine; | |
| using UnityEditor; | |
| public class PathBuilder : EditorWindow { | |
| public static PathBuilder pathEditor; | |
| // define properties | |
| public static Camera mainCamera; | |
| public static Rect rctTitleMaster; |
| <figure class="flickr"> | |
| <figcaption></figcaption> | |
| </figure> |