[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#66714: [FIXED] Expr substr on plus symbol
From: |
petabaud51 |
Subject: |
bug#66714: [FIXED] Expr substr on plus symbol |
Date: |
Mon, 23 Oct 2023 20:58:24 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.1 |
NEVERMIND, IT'S ON 'INFO EXPR'.
Could you folks please add it to 'man expr'?
XXX
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
--
- bug#66714: [FIXED] Expr substr on plus symbol,
petabaud51 <=