Greetings, I'm not sure if this is the intended UNIX/POSIX behaviour, but on: < expr substr a 1 2 , I get: > a , which is right, but on: < expr substr + 1 2 I get: > expr: syntax error: missing argument after ‘2’
On expr "$line_of_text" 1 2, this error is thrown if the line is a simple '+'. A real-world scenario is getting the first character of each line in bulk, crashing if the line is '+'.
< expr --version > expr (GNU coreutils) 8.32 --