Tag Info

Hot answers tagged

3

Even though ksh has more advanced feature than other shells, it's still at its heart a language to automate simple task and write small scripts, not a language geared towards writing huge applications. You can't expect to have all the features of a typical language designed for large applications, let alone all the features of C++. I don't think you can ...


3

For ksh93, you have (at least) a couple of choices associative arrays envir=Dev foo["$envir"]=bar echo "${foo["$envir"]}" namerefs nameref var=${envir}foo var=bar echo "$var" For ksh88, you may be stuck with eval: envir=Dev name="${envir}foo" eval "$name=bar" eval "echo \$$name"


1

Piping an input file into a read command is generally a recipe for disaster, it can work in some circumstances, but in many cases it does not. Best to learn a more consistent way of doing this. Here are a couple of simple alternatives... nawk '{print $1}' $( cat input.txt ) > output.txt or if you want it in a loop... for FILENAME in $( cat input.txt ...


1

I'm not sure which version of System V you're using, nor which version of ksh, but it's possible to change the completion key to Tab with ksh93 (not with ksh88, though, I believe). Depending on age, these in your ~/.profile may do it: set -o emacs bind bind "^I=complete" See this thread for more info.



Only top voted, non community-wiki answers of a minimum length are eligible