Someone can explain me about the more command?when I use it with || or with &&, it seems to have an exist status of true, even when the file is not found(Unlike the other commands).~/Desktop$ more notExists || echo aaanotExists: No such file or directory~/Desktop$ more notExists && echo aaanotExists: No such file or directoryaaa
more command behavior
exit;more
The return value of more is different on OSX and Linux. Run this to see what the return value is on your flavor of Unix:more file_that_doesnt_exist; echo $?On OSX, I get 1 on failure and 0 on success.On Ubuntu and RedHat Linux, I get 0 on failure and 0 on success. This would seem to be a bug.Another alternative would be to use less. It seems to return correct exit codes in Ubuntu Linux.Yet another alternative would be to use:{ cat file_that_doesnt_exist || echo nonexistent; } | moreThe cat command seems to return expected exit codes in Linux.