I'd like to be able to declare a local var as the result of a command AND to be able to capture return status of command.
Something like this:
#!/bin/ksh
typeset -r command_output=$(command)
typeset ...

I have a script I've setup to run a number of tasks, one of which is to set up a table in a DB and later remove it (for automated testing).
The issue comes that on only a few of the users that I use ...

I've tried several modifications to see why it's not working, but I can't find the answer.
Here is my code, this is in french but this is just a normal fonction that ask to the user if he's ready to ...

I have a case statement inside some of the if statement, but after doing the case statement inside the if statement, the loop ends. After the case statement, it is supposed to go to the next value on ...

In bash you can load a different profile by using the --rcfile option, is there such an option in ksh? Or perhaps a workaround...
I know you can invoke the shell without the .kshrc profile using the ...

For some reasons, Im using ksh and zsh in my scripts and returning to -bash, I need to use already set variable values in the spawned shells, writing it to some temp file and using that didn't look ...

I am writing a script in Korn Shell, where at one statement I want something like getch() used in C.
I want my while loop to be exited, if it sees that I have pressed ESC in Keyboard.
For eg.
while ...

I have where clauses for SQL queries in text form, and I'd like to extract the column names from them. The clauses can contain conditions like col_1 = 'Spruce' and col_2 in ('Argentina', 'Cameroon').
...

I am not extremely familiar with KSH (Actually just started using it) and I am having problems with trying to create a script that will essentially compare two arrays that have been stored and then ...

I'm need to get the value of a variable from a remote host in a script using SSH and have to source an environment file first that does a shift at the end of its run.
The command works locally and I ...

NOTE: Pertaining to the duplicate referenced - I already tried that prior to posting here and got the exact same results. I've posted an additional section below with this so that you can see what I ...

In my testing (in Bash and Z Shell), I saw no problems with defining functions or aliases or executable shell scripts which have hyphens in the name, but I'm not confident that this will be okay in ...

I have looked through a number of question but they do not satisfactorily reply to my question.
I need to print words that match the pattern exactly not the lines containing that word.
For example:
...