Permalink
Browse files

Moar commands.

  • Loading branch information...
1 parent 2b6d8af commit 58dba6d74f6d92e0909855a6e7f18c9f207a405f @jlouis committed Oct 11, 2012
Showing with 31 additions and 0 deletions.
  1. +6 −0 bin/'chk
  2. +3 −0 bin/crlf
  3. +6 −0 bin/g
  4. +3 −0 bin/long
  5. +3 −0 bin/nocr
  6. +10 −0 bin/q
View
6 bin/'chk
@@ -0,0 +1,6 @@
+#!/bin/rc
+
+if(~ $#* 0)
+ grep -v '^[^'']*(''[^'']*''[^'']*)*$' $*
+if not
+ grep -nv '^[^'']*(''[^'']*''[^'']*)*$' $* /dev/null
View
3 bin/crlf
@@ -0,0 +1,3 @@
+#!/bin/rc
+
+cat $* | sed 's/(^|[^
View
6 bin/g
@@ -0,0 +1,6 @@
+#!/bin/rc
+
+flags=()
+while(! ~ $#* 1 && ~ $1 -*) {flags=($flags $1); shift}
+if(~ $#* 1) {grep -n $flags -- $1 *.[Cbchm] /dev/null}
+if not grep -n $flags $* /dev/null
View
3 bin/long
@@ -0,0 +1,3 @@
+#!/bin/rc
+
+cat $* | pr -t -e8 | awk 'length($0) > 80 { print NR ": " $0 }'
View
3 bin/nocr
@@ -0,0 +1,3 @@
+#!/bin/rc
+
+cat $* | sed 's/
View
10 bin/q
@@ -0,0 +1,10 @@
+#!/bin/rc
+
+if(~ $#* 0)
+ what=' '
+if not {
+ what=$1
+ shift
+}
+
+sed 's/^/'$what' /' $*

0 comments on commit 58dba6d

Please sign in to comment.