For some reason I'm unable to get expr to work with any parameters on strings that contain spaces. For example,
This works:
Code:$ temp='Fantastic' $ expr substr $temp 1 3 Fan
Whereas this doesn't:
The only difference is the added space. This problem occurs for all parameters of expr, including the length parameter.Code:$ temp='Fantastic work' $ expr substr $temp 1 3 expr: syntax error
Suggestions welcome.
Bookmarks