dropdown menu

EXTRA - KSH

The Korn shell, or ksh, was originally developed by David Korn of AT&T Bell Laboratories in 1982.

Setting up the Korn shell to your liking is relatively simple: While logged in under ksh, view your current settings by using the -o switch with the set:

set -o:
* bgnice: Run all processes in the background at a lower priority.
* emacs: When editing the command-line text entered, use the emacs-style inline editor.
* gmacs: When editing the command-line text entered, use the gmacs-style inline editor.
* ignoreeof: Ignore end-of-file characters, and do not exit the shell.
  If the user wants to exit, the user must type the exit command or press Control-D 11 times.
* markdirs: Place a forward slash (/) on the end of all directories that are from a file name substitution.
* monitor: Run all processes in the background,and inform the user when the process has finished by printing a line to stdout.
* noexec: Do not execute the commands. Instead, just check for syntax errors.
* restricted: Run a restricted shell. Users cannot change directories; change their SHELL, ENV, or PATH variables.
  Cannot execute a command that contains a forward slash (/) in the pathname; or redirect output.
 * vi: When editing the command-line text entered, use the vi-style inline editor.

To turn options on with the built-in command set, use the -o switch. If you change your mind, you can turn off the options you set by using the +o switch, instead.

esc + \        filename completion




 

5 comments:

Anonymous said...

AIX command line for loop or AIX CLI for loop, note KSH93 is needed for this to work:

$ ksh93
$ for i in {1..10}
> do
> echo $i
> done
1
2
3
4
5
6
7
8
9
10
$

aix said...

Thanks :)

Anonymous said...

Hello Experts,

I have a file csv format and at the end of each line there are spaces.
This causes issues when trying to input data into our system.
We want to remove the spaces at the end of each line in our file.
Any idea/

Thanking you in advance for your help and understanding

Best Regards

aix said...

Hi, I used this method to remove last characters from each line in a csv file:
#remove the ending ^M (015) characters what excel puts at the end of each line
tr -d '\015' <$LPAR_CSV >$TMP_FILE

Please check the ASCII code (probably octal format) for 'space' character and change 015 to that number.

Crepes Recipes said...

Good readinng your post