can a korn shell script be written on HP-UNIX?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers can a korn shell script be written on HP-UNIX?
# 1  
Old 07-10-2008
can a korn shell script be written on HP-UNIX?

Is HP UNIX and Korn different flavours of unix?

can a korn shell script be written on HP Unix?
# 2  
Old 07-10-2008
the shell is an "interface" between the user and the system. if you've a ksh on your hp-ux you can write and use this scripts. if not, just install ksh.
# 3  
Old 07-10-2008
which means i can write korn shell scripts in hp-ux environment

Thanks
# 4  
Old 07-10-2008
I would even use ksh as default shell... (/usr/bin/ksh in /etc/passwd for your account)
just a remark:
since HPUX11i the default /usr/bin/sh - is not the original bourne shell:
ant:/home/vbe $ ll /sbin/sh
-r-xr-xr-x 1 bin bin 417792 Dec 15 2007 /sbin/sh # this is bourne
ant:/home/vbe $ ll /usr/bin/sh
-r-xr-xr-x 2 bin bin 208896 Dec 15 2007 /usr/bin/sh # this is the posix shell
# 5  
Old 07-11-2008
On HPUX see: man sh
This help lists the shells available ... including ksh.
Then: man ksh

To force a script to run in ksh, the very first line must be:

#!/bin/ksh


Don't forget the "#" .


(Before anybody posts a correction ... /usr/bin/ksh and /bin/ksh are hard links to the same inode).
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

UNIX Korn Shell to Linux Bash

Migrating Unix batch jobs (Korn Shell) running in HP-UX server to Linux environment. Hi All Please help me to understand the easiest way to migrate Kernel Shell scripts to Linux Bash. Also let me know 1. Any automated scripts or tools available for this. 2. Challenges and issues... (5 Replies)
Discussion started by: cpremesh
5 Replies

2. Shell Programming and Scripting

security for unix korn shell script

hello I am using a korn shell script. I want to make them password protected. Please suggest some ways to do it. thanks in advance for your sufggestion ! (1 Reply)
Discussion started by: urfrnddpk
1 Replies

3. Programming

How could I interact with shell script from webportal written in php?

Hello, I am new on PHP scripting .I have shell scripts which I an running currently from linux server but now I want to make a web portal from where I will run all my scripts but the problem is all my scripts ask for parameters so I am getting confused how could I run my shell script from web... (2 Replies)
Discussion started by: anuragpgtgerman
2 Replies

4. Shell Programming and Scripting

Unix Korn Shell script on Solaris to DB2 UDB LUW database

I am rather new to korn shell scripting and attempting to write a Unix script that would detach, attach a range partition table in DB2 UDB LUW database. This would be a job scheduled in control M that reads in an input file with 5 parameters passed to it from the application. I don't have much... (1 Reply)
Discussion started by: tjhanso
1 Replies

5. Shell Programming and Scripting

what's the largest shell script you've ever written?

I've just written a test harness using ksh. One of scripts weighed in at 1206 lines. I came across Eric Raymonds 'Art of Unix programming' on line and he advises against excessively large scripts. I am very interested to hear people's opinions on this and any experiences they have had. (2 Replies)
Discussion started by: OFFSIHR
2 Replies

6. UNIX for Dummies Questions & Answers

practice tests- Unix Korn Shell Scripting

Hi, I am about to take certification for "Unix Korn Shell Scripting", which is conducted by brain bench. ( http://www.brainbench.com/xml/bb/common/testcenter/taketest.xml?testId=46) The test consists of 40 single and multiple choice questions that must be answered in 60 minutes. The pass mark... (0 Replies)
Discussion started by: eswasas
0 Replies

7. UNIX for Dummies Questions & Answers

Online UNIX emulator for Korn Shell scripting

Hi, I am very new to UNIX and I wanted to know if there is any online UNIX emulator in which I can practice Korn shell scripting. I have internet access, but my machine's OS is Windows XP. I just had my UNIX fundamental class and wanted to practice some shell scripting. I am not in a position to... (1 Reply)
Discussion started by: eswasas
1 Replies

8. Shell Programming and Scripting

Unix Korn Shell Array Issue (SunOS)

Hello, I'm currently messing around with arrays for the first time in scripting (Unix Korn Shell). All I'm trying to do right now before I make things complicated is read through and print out to screen whether the read file is or is not a directory. Here is my directory: ls -l total... (5 Replies)
Discussion started by: Janus
5 Replies

9. Shell Programming and Scripting

Simple shell script to be written

There are 2 shell script files sh1 and sh2. sh2 contains records such as 01 02 03 on different lines. In sh1, I would like to read each record of sh2 till end of file, concatenate them with a comma(,) and store in a variable. Can somebody please help me with the sh1 script? Thanks in... (6 Replies)
Discussion started by: shsandeep
6 Replies

10. UNIX for Dummies Questions & Answers

Simple shell script to be written

There are 2 shell script files sh1 and sh2. sh2 contains records such as 01 02 03 on different lines. In sh1, I would like to read each record of sh2 till end of file, concatenate them with a comma(,) and store in a variable. Can somebody please help me with the sh1 script? Thanks in... (2 Replies)
Discussion started by: shsandeep
2 Replies
Login or Register to Ask a Question