#!/usr/local/bin/jrun NB. This script computes the sizes of the files in NB. ls -al * | j-script in =: stdin '' nl =: 10{a. cut =: ;. lines =: < cut _2 in cut_line =: 3 : '< cut _2 (> y.) , '' ''' monad =: 3 define =: : script =: 0 drop =: }. not =: -. and =: *. cl =: cut_line & (compress &. >) compress =: monad define '1 drop _1 drop (1,not (1 drop t) and _1 drop t =. y. = '' '')#y. =. '' '' , y. , '' ''' echo +/ ". > 4 { "1 cl lines