Shell options are annoying (rant)

Just going through the bash text processing module on DQ and frustrated by the fact that identical options for different commands are not consistent.


column -s',' <-- sets delimiter as ,
sort -t',' <-- sets delimiter as ,
cut -d',' <-- sets delimiter as ,

■■■. Why not just use the same character? And it’s not good enough to say those characters are used already to do other things in those other options. This should not have been allowed to proceed beyond the brainstorming stage when bash was invented. There is a better way. This just feels lazy.

:laughing: I sympathize. There’s a reason why things are as they are though. Maybe not a good reason, but that’s a different story.

You may recall from The Unix Philosophy screen that one of the greatest benefits of Unix-like shells is that it allows us to combine several different programs.

“Different programs” is key here. These tools (column, sort and so on on) each exist on their own right, without them being part of a suite of programs. Bash uses these programs, these programs aren’t part of Bash.

Each of them was probably developed by different people, so they each used whatever they felt was right. Moreover, many of these programs are several decades old. Why it is that no one ever gotten around to standardizing this, I do not know.

1 Like