Search

Top 60 Oracle Blogs

Recent comments

Little Things Doth Crabby Make – Part XXI. No, colrm(1) Doesn’t Work.

This is just another quick and dirty installment in the Little Things Doth Crabby Make series. Consider the man page for the colrm(1) command:

#000000;" src="https://kevinclosson.files.wordpress.com/2017/07/capture11.png?w=500&h=99" alt="" width="500" height="99" srcset="https://kevinclosson.files.wordpress.com/2017/07/capture11.png?w=500&h=99 500w, https://kevinclosson.files.wordpress.com/2017/07/capture11.png?w=996&h=198 996w, https://kevinclosson.files.wordpress.com/2017/07/capture11.png?w=150&h=30 150w, https://kevinclosson.files.wordpress.com/2017/07/capture11.png?w=300&h=60 300w, https://kevinclosson.files.wordpress.com/2017/07/capture11.png?w=768&h=153 768w" sizes="(max-width: 500px) 100vw, 500px" />

That looks pretty straightforward to me. If, for example, I have a 6-column text file and I only want to ingest from, say, columns 1 through 3,  I should be able to execute colrm(1) with a single argument: 4. I’m not finding the colrm(1) command to work in accordance with my reading of the man page so that qualifies as a little thing that doth crabby make.

Consider the following screenshot showing a simple 6-column text file. To make sure there are no unprintable characters that might somehow interfere with colrm(1) functionality I also listed the contents with od(1):

#000000;" src="https://kevinclosson.files.wordpress.com/2017/07/capture22.png?w=500&h=207" alt="" width="500" height="207" srcset="https://kevinclosson.files.wordpress.com/2017/07/capture22.png?w=500&h=207 500w, https://kevinclosson.files.wordpress.com/2017/07/capture22.png?w=150&h=62 150w, https://kevinclosson.files.wordpress.com/2017/07/capture22.png?w=300&h=124 300w, https://kevinclosson.files.wordpress.com/2017/07/capture22.png 668w" sizes="(max-width: 500px) 100vw, 500px" />

Next, I executed a series of colrm(1) commands in an attempt to see which columns get plucked from the file based on different single-argument invocations:

#000000;" src="https://kevinclosson.files.wordpress.com/2017/07/capture3.png?w=500" alt="" srcset="https://kevinclosson.files.wordpress.com/2017/07/capture3.png 292w, https://kevinclosson.files.wordpress.com/2017/07/capture3.png?w=71 71w" sizes="(max-width: 292px) 100vw, 292px" />

Would that make anyone else crabby? The behavior appears to me very indeterminate to me and that makes me crabby.

Thoughts? Leave a comment!

 

Filed under: oracle