I am trying to get the index of a particular substring from a string in KornShell (ksh), but all I get is syntax error. The Below is the syntax I am using
trying to get the index of "logic" from string "filename_newpart_logic"
command used is expr index "$string1" "logic"
but the result is expr: syntax error
I have tried the same in some online command editors and it works perfectly, but not in the shell. The ksh version is quite old. Please let me know if there is any other syntax/alternative way to achieve this.