Questions tagged [ksh]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2
votes
0answers
33 views

Change directory problem in ksh

I work with Ubuntu 18.04.3 My current directory is /home/hans/bin, The directory /home/hans/.sshz also exist. My shell is "ksh." The command cd ../.ssh give the output. ksh cd: /home/hans/ssh:[No ...
0
votes
1answer
95 views

How to call ksh script within bash script?

I am have written a script which will silently installed Microstrategy on Amazon Linux 2.0 In My main script i am calling Microstrategy installation script which is in /bin/ksh and mine is in /bin/...
9
votes
5answers
2k views

Why is a blank required between “[[” and “-e xxx” in ksh?

For instance, the following command does not work: if [[-e xyz]]; then echo File exists;fi ksh gives the following error [[-e: command not found Is that because "[[-" is ambiguous?
0
votes
3answers
646 views

how to write into cronjob from a shell script

I would like to automate cronjob (meaning schedule a job to be done from a shell script). So i have script that does this #!/bin/ksh timestamp=$(date +%H%M%S) if [ "$timestamp" -eq 230000 ]; then ...
0
votes
1answer
20 views

FTPing inside of a ksh script, get part not working

#!/bin/ksh . $HOME/bin/init.ksh log_start exit_if_not_dgftp EXPIRE_DAYS=30 create_arc_dir handle_error abort $? "Command create_arc_dir failed" $USER purge_archive $EXPIRE_DAYS WORK_FILE=...
0
votes
2answers
318 views

Error in the simple shell script ( i.e.+ : unexpected `end of expression' )?

find_totalusage() { local totalusedsize=0 for dirname in $dirnamelist do dirsize=$(find_dir_size "$dirname") totalusedsize=$(( $totalusedsize + $dirsize )) done ...
10
votes
3answers
2k views

Why are numeric function names not allowed?

Consider the following: $ ksh -c '1(){ echo hi;};1' ksh: 1: invalid function name $ dash -c '1(){ echo hi;};1' dash: 1: Syntax error: Bad function name $ bash -c '1(){ echo hi;};1' bash: `1': not a ...
1
vote
1answer
96 views

How compatible dash is with ksh?

Can I make /bin/sh symlinked to /bin/ksh instead of /bin/dash without breaking anything in the process ? Since they're both supposed to be POSIX-compliant, can I reasonably expect the replacement to ...
0
votes
1answer
40 views

Where can I find a list of the features from Korn and C shells incorporated by Bash?

I would like to have some documentation about the features from Korn (ksh) and the C (csh) shells incorporated in the Bash command language interpreter. A exhaustive list of commands would be great. ...
1
vote
0answers
110 views

Login Errors with KSH

My cloud team setup a Ubuntu 16.04 AMI for me in AWS. They have done some items to 'Harden' the instance but they normally use amazon linux and not Ubuntu so I think they have broken some things. ...
8
votes
1answer
3k views

What are these auxiliary file descriptors?

While poking around /proc/self folder for my mksh shell, I found a peculiar thing: in /proc/self/fd/* there are all the standard file descriptors (0 for stdin, 1 for stdout, and 2 stderr) some file ...
0
votes
1answer
747 views

Difference between bash-shell and ksh-shell by using while with read - what can I do in bash for the same response as in ksh?

I have two scripts: in bash #!/bin/bash H_VARIABLE=empty echo "Zeile1 Zeile2" | while read satz do H_VARIABLE="$H_VARIABLE $satz" done echo H_VARIABLE=$H_VARIABLE Result: H_VARIABLE=...
1
vote
1answer
227 views

Default login shell ksh [closed]

I want to set the default login shell to the Korn shell (ksh) but chsh doesn't recognize /bin/ksh as a shell. /bin/ksh has been loaded.
6
votes
3answers
8k views

How do I change to ksh?

I need to learn some ksh details, but i don't want to change from bash to ksh permanently. What should i do? Is it possible to change shell only for a specific console session?