Hello,
I have something that should be very simple yet I am losing my head in figuring out how to get it to work:
I am calling a function passing a parameter, this will return a particular string, next I want to substring the returned value and break it apart.
All of this I want to do on a single line of code under ksh93.
I tried a few combinations but I cannot get it to work. Any ideas?
I suppose I am doing something improper with the brackets and/or parentheses. Here is my one liner:
new_var=${$(functionCall parametersForFunction):0:4}
I would have expected the chunk:
$(functionCall parametersForFunction)
to be the returned string from the function call executed, and include it in the substring statement, but no luck, I keep getting a parsing error.
Hope you can help, thanks