Sponsored Content
Full Discussion: ksh on UNIX and Linux
Top Forums UNIX for Dummies Questions & Answers ksh on UNIX and Linux Post 302869487 by vbe on Wednesday 30th of October 2013 11:47:58 AM
Old 10-30-2013
I remember the times when you were taught shell basics, and so was pure sh for compatibility, it is also true for ksh... things may change when it comes to advanced features and extensions where it may differ depending of implementation ( and so KSH93 or KSH88 with posix extension...) ... In other words if your shellscript is pure standard ksh it has no reason to not be compatible between UNIX variants or LINUX so sticking to old syntax will almost always work, recent fany extension may give surprises...
addendum
I stick to old ksh to be sure I have no problem when copying my scripts from HP-UX to Solaris or AIX thought its more AIX to solaris and linux now... (AIX has ksh93 ( the server I squat I upgraded to 7.1 so not sure about the other releases...) HP-UX 11.11 is not KSH93 nor is Solaris 10 ksh)

Last edited by vbe; 10-30-2013 at 12:55 PM.. Reason: addendum
This User Gave Thanks to vbe For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script Migration From HP to Linux (KSH)

Hi All, Currently iam going to migrate some of the ksh scripts from HPUX to LINUX. Will there be any major change in scripts which I have to take care for migration? Appreciate some help on this. Thanks Om (1 Reply)
Discussion started by: Omkumar
1 Replies

2. Shell Programming and Scripting

ksh/Linux: Variable scoping issue? Pl. help!

user_account() { set -x nodename=$1 # set userid to user0 userid="user0" echo outside:pid $$ cat $MY_DIR/user_accounts | while read line do # line="node1 user1" echo inside do: pid $$ line:$line userid:$userid poss_node=`echo $line |awk '{print $1}'`... (2 Replies)
Discussion started by: jasmeet100
2 Replies

3. Shell Programming and Scripting

Need to cut filename in LINUX ksh

Hi, I need to cut filename in Linux ksh. for example file name is c_xxxx_cp_200908175035.zip. I need to get variable with only c_xxxx_cp value. (10 Replies)
Discussion started by: juliyp
10 Replies

4. Shell Programming and Scripting

New line character problem with ksh on Redhat Linux

Guys, I would like to discuss the problem I am seeing with echo “\n” statement in Redhat Linux Enterprise 5.3 version. I have a shell script that was written couple of years back for generic UNIX platforms based on ksh and was tested on Solaris 8,9,10 ; AIX 5.3 and Red Hat Enterprise Linux... (5 Replies)
Discussion started by: rijeshpp
5 Replies

5. Shell Programming and Scripting

Newline charachter in Ksh-Linux

Hello, I'm trying to create a muliti value shell variable with newlines inside it, So that I can read the values of that variable individually line by line, but KSH seems to be stripping my variable of newlines in LINUX, but UNIX its working fine. Here's Example : String =... (3 Replies)
Discussion started by: Sanju1236
3 Replies

6. Linux

clear in Linux ksh

Clear in Linux #!/usr/bin/ksh am using clear in the script, but it is not working, it gives an error as follows, 'xterm': unknown terminal type. please help out.:confused: ---------- Post updated at 01:19 PM ---------- Previous update was at 12:01 PM ---------- if then ... (2 Replies)
Discussion started by: pradebban
2 Replies

7. Shell Programming and Scripting

AWK Program Not Executing On Linux with KSH

Overview: I have an AWK program that parses thru a database backup server log file and outputs ths following parameters SRNO DATE : TIME SIZE IN(KB) DATABASE NAME DUMP TYPE 1 May 16 2012: 13:30:00 6874 TestDB database 2 May 16 2012: 13:30:44 11462 master database Problem: This program has... (5 Replies)
Discussion started by: JolietJake
5 Replies

8. Shell Programming and Scripting

ksh script migration from Solaris to Linux.

We are migrating some scripts (ksh) from Solaris 10 to Linux 2.6.32. Can someone share list of changes i need to take care for this ? Have found few of them but i am looking for a exhaustive list. Thanks. (6 Replies)
Discussion started by: Shivdatta
6 Replies

9. Red Hat

Linux ksh script not working in crontab

I am Not sure why following script is not capturing the counts only when using crontab !! when I run it fromt he command line it is fine ! what is missing here ! #!/usr/bin/ksh host=`uname -n` tdate=`date` userid='dbid/password' totalevents=`sqlplus -s $userid << - set timing off ... (1 Reply)
Discussion started by: mrn6430
1 Replies

10. Shell Programming and Scripting

Increase command length for ksh shell on Redhat Linux

I have a ksh shell script and i need to pass arguments which are generated by data pulled from a database. When the argument to the shell script is too long (about 4000 charecters) the below is the issue observed. I copy the command which is 4000 charecters long from the logs and paste it... (7 Replies)
Discussion started by: mohtashims
7 Replies
pwd(1)								   User Commands							    pwd(1)

NAME
pwd - return working directory name SYNOPSIS
/usr/bin/pwd DESCRIPTION
The pwd utility writes an absolute path name of the current working directory to standard output. Both the Bourne shell, sh(1), and the Korn shells, ksh(1) and ksh93(1), also have a built-in pwd command. ENVIRONMENT VARIABLES
See environ(5) for descriptions of the following environment variables that affect the execution of pwd: LANG, LC_ALL, LC_MESSAGES, and NLSPATH. EXIT STATUS
The following exit values are returned: 0 Successful completion. >0 An error occurred. If an error is detected, output will not be written to standard output, a diagnostic message will be written to standard error, and the exit status will not be 0. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ |CSI |Enabled | +-----------------------------+-----------------------------+ |Interface Stability |Committed | +-----------------------------+-----------------------------+ |Standard |See standards(5). | +-----------------------------+-----------------------------+ SEE ALSO
cd(1), ksh(1), ksh93(1), sh(1), shell_builtins(1), attributes(5), environ(5), standards(5) DIAGNOSTICS
``Cannot open ..'' and ``Read error in ..'' indicate possible file system trouble and should be referred to a UNIX system administrator. NOTES
If you move the current directory or one above it, pwd may not give the correct response. Use the cd(1) command with a full path name to correct this situation. SunOS 5.11 2 Nov 2007 pwd(1)
All times are GMT -4. The time now is 02:10 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy