Skip to content

Commit

Permalink
Introduce the CL command.
Browse files Browse the repository at this point in the history
  • Loading branch information
jlouis committed Mar 5, 2016
1 parent bc4e6b7 commit 8fd3ef3
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions bin/cl
@@ -0,0 +1,20 @@
#!/usr/bin/env rc

if(~ $#TMPDIR 0)
TMPDIR=/tmp
tmp=$TMPDIR/ssam.tmp.$USER.$pid
cat $* >$tmp

{
# select entire file
echo ',{'
echo k
echo '}'
echo 0k

# Excess whitespace
echo ', x/[ ]+$/ d'
echo ', s/\n\n\n+/\n\n/g'
} | sam -d $tmp >[2]/dev/null

rm -f $tmp

0 comments on commit 8fd3ef3

Please sign in to comment.