3 ms·
"rs" for "reshape array". Found only on FreeBSD systems (yes, we are better... smile) For example, transpose a text file: ~/ (j=0,r=1)$ cat foo.txt a b c d
by forkandwait 12y ago
"rs" for "reshape array". Found only on FreeBSD systems (yes, we are better... smile)
For example, transpose a text file:
~/ (j=0,r=1)$ cat foo.txt
a b c
d e f
~/ (j=0,r=0)$ cat foo.txt | rs -T
a d
b e
c f
Honestly I have never used in production, but I still think it is way cool.
Also, being forced to work in a non-Unix environment, I am always reminded how much I wish everything were either text files, zipped text files, or a SQL database. I know for really big data (bigger than our typical 10^7 row dataset, like imagery or genetics), you have to expand into things like HDF5, but part of my first data cleaning sequence is often to take something out of Excel or whatever and make a text file from it and apply unix tools.
- jingo 12y ago"Found only on FreeBSD..." Also found on NetBSD, OpenBSD and DragonFlyBSD.
- clarry 12y agoUtree tells rs dates back to early 80s... http://minnie.tuhs.org/cgi-bin/utree.pl?file=4.2BSD/usr/src/new/new/tools/man/rs.1 http://minnie.tuhs.org/cgi-bin/utree.pl?file=4.2BSD/usr/src/...
- super_mario 12y agoIt's also on Mac OS X by default :D.