Live data from Hacker News

More, less, and a story of typical Unix fossilization

utcc.utoronto.ca

21–30 of 127 posts

Re: More, less, and a story of typical Unix fossilization

#21
> In a sane world, Unix vendors would have either replaced their version of more with the clearly superior less

But that's just the thing - 'less' isn't "clearly superior" to 'more'. It is (or was, maybe this has changed) heavier weight and offers more functionality that may not be needed. Having both commands lets script writers use exactly the tool they need for the job. And it's not like the extra 35KB of keeping the 'more' binary around is really breaking the bank.

Re: More, less, and a story of typical Unix fossilization

#22
post #15

I've used Linux for a decade-and-a-half, but I've never totally loved the shell, because of the need to learn this sort of pointless arcana. PowerShell was a massive step forward, and I had hoped that an Open Source, cross-platform equivalent would develop so that we could get past the current local maxima of 1970s-era design. It's rather weird that the Open Source equivalent of PowerShell is now...PowerShell. Even i…

Using powershell left a really sour taste in my mouth. I felt I was promised that objects and types would prevent errors, but it just feels like everything is harder and mistakes are just as easy.

For example, 'diff (cat a.txt) (cat b.txt)' does something very different from what you'd expect, but works OK for most inputs. The perfect combination for putting bugs into production.

I still like that powershell exists. Especially on Windows where they needed it most. On Linux, though, I'd rather stick with the devil I know.

Re: More, less, and a story of typical Unix fossilization

#23
post #11

I prefer less. Incidentally, the other day I was on a CentOS system where I wanted to paginate a log file and typed in "less". Turns out, unlike more, less isn't installed by default. Was a bit surprised because I was under the impression that most Linux systems would have had it in their default install.

Debian doesn't install it by default either - agree, surprising. On another note, even more surprising is less's behavior with colored output (you have -r and -R switches, which are almost, but not completely, alike; and in neither of them does page-up render properly).

I was pretty sure this is incorrect for at least Debian 8 / Jessie based on recollection. And now I'm 100% sure it's false -- sigh https://www.xkcd.com/386/ -- having just installed it in a VM with only "standard system utility" selected (it is selected by default), and verified that less is installed.

Re: More, less, and a story of typical Unix fossilization

#24
post #15

I've used Linux for a decade-and-a-half, but I've never totally loved the shell, because of the need to learn this sort of pointless arcana. PowerShell was a massive step forward, and I had hoped that an Open Source, cross-platform equivalent would develop so that we could get past the current local maxima of 1970s-era design. It's rather weird that the Open Source equivalent of PowerShell is now...PowerShell. Even i…

> I've never totally loved the shell

I don't understand your point, PowerShell is a shell too, just like Bash or Zsh. When you call less, more or any other tool from Powershell, you still retain all the problems that are mentioned in the article. I think the article was focusing more on the ecosystem than anything.

Re: More, less, and a story of typical Unix fossilization

#25
post #21

> In a sane world, Unix vendors would have either replaced their version of more with the clearly superior less But that's just the thing - 'less' isn't "clearly superior" to 'more'. It is (or was, maybe this has changed) heavier weight and offers more functionality that may not be needed. Having both commands lets script writers use exactly the tool they need for the job. And it's not like the extra 35KB of keeping…

The problem isn't the 35k, the problem is now we all have to spend a little bit of extra brain capacity, remembering the difference between 'more' and 'less', and how while you would imagine 'more' is better (based on the traditional English meaning of the words), actually, 'more' is the lesser product.

I wonder how many hours have been wasted altogether on people learning, and misunderstanding, which of more or less they should use?

Re: More, less, and a story of typical Unix fossilization

#26
post #15

I've used Linux for a decade-and-a-half, but I've never totally loved the shell, because of the need to learn this sort of pointless arcana. PowerShell was a massive step forward, and I had hoped that an Open Source, cross-platform equivalent would develop so that we could get past the current local maxima of 1970s-era design. It's rather weird that the Open Source equivalent of PowerShell is now...PowerShell. Even i…

I dunno, I'm a long term *NIX person (Solaris 1994-2011, Linux on and off 1994-2006, Linux mostly 2006-now) I am now involved in more Powershell scripting on Windows than I have ever done before. I don't see - Get-Content -Tail 10 FILE as an improvement on - tail -10 FILE I think when it comes to the combination of intuitive command names and terseness when required, VMS' DCL is still unsurpassed. Having commands wit…

To me, the main advantage of Powershell is filename handling.

I know that if I do everything just right, then my scripts will handle filenames with spaces/newlines/other crazy characters, but I always mess up somehow. Nowadays if I ever want a script I'll distribute to people who might have spaces in directories, I write it in python even if it would be a 4 line bash script, just to avoid the issue.

Re: More, less, and a story of typical Unix fossilization

#28
post #3

Now all we need is someone to modify less to recognize that its standard in is connected the output of more so that if you type `cat /etc/passwd | more | less` it could output something which, more or less, looked like the input.

I see what you did there. I think.

Re: More, less, and a story of typical Unix fossilization

#29
I preferred 'more' over 'less' only in situations where I just wanted to see the first couple of many pages of output from something (for example compilation errors where the root cause is at the beginning and the rest is meaningless). 'less' would then block user interaction while reading all input (interruptible with ^G), while 'more' would display the first page immediately and stop reading from stdin.

For all other use cases, 'less' seemed clearly superior.

Post reply on HN