Sponsored Content
Full Discussion: ksh and sh
Top Forums UNIX for Dummies Questions & Answers ksh and sh Post 302116510 by TinWalrus on Friday 4th of May 2007 03:29:44 PM
Old 05-04-2007
the #!/bin/ksh at the top of the file define what the following commands in the script use as an interpreter, in this case /bin/ksh (the korn shell)

you can put practically any interpretive shell command there, i.e.

#!/usr/bin/awk for awk
#!/usr/bin/perl for perl

and so on. putting a ':' there will mean use the default shell

the difference between sh and ksh (bourne and korn) is mostly functionality. i.e. ksh has variable substitutions, dimensioned arrays, etc
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

executing a ksh script from another ksh script

Hi, I'm new to unix scripting.How can i call a script from another script. I have a.ksh and b.ksh .I have to call b.ksh from a.ksh after it is successfully exceuted. I tried using #!/bin/ksh -x in a.ksh and at the end i have used /path/b.ksh My problem is it is executing only a.ksh.it... (6 Replies)
Discussion started by: ammu
6 Replies

2. Shell Programming and Scripting

tracing a ksh script within a ksh script

I normally trace a script with the ksh -x <script name> and redirect strderr to file. But if you have a script like the examble below...... vi hairy bear=`grep bear animals` if then ksh more_animals fi If I ksh -x hairy it won't trace "more_animals" unless I put a -x in it. Is... (1 Reply)
Discussion started by: shorty
1 Replies

3. Shell Programming and Scripting

import var and function from ksh script to another ksh script

Ih all, i have multiples ksh scripts for crontab's unix jobs they all have same variables declarations and some similar functions i would have a only single script file to declare my variables, like: var1= "aaa" var2= "bbb" var3= "ccc" ... function ab { ...} function bc { ... }... (2 Replies)
Discussion started by: wolfhurt
2 Replies

4. Shell Programming and Scripting

Help with KSH

Hi, I need some help with the Ksh scripting.... I have a Script call Mail.ksh which calls Crank.ksh which calls Readdates.ksh whoch calls mindiff.ksh the output of mindiff.ksh and Readdates.ksh are wirtten to a text file... Here is how each file is called or executed... ./Mail.ksh 30... (3 Replies)
Discussion started by: bhagya2340
3 Replies

5. Shell Programming and Scripting

Need help on ksh

1. Script using bash #!/bin/bash a=4294967296 (( b=$a / 2 )) echo "$a" echo "$b" *** output *** 4294967296 2147483648 2. Script using ksh #!/bin/ksh a=4294967296 (( b=$a / 2 )) echo "$a" echo "$b" *** output *** 4294967296 (3 Replies)
Discussion started by: gautam.shrestha
3 Replies

6. Shell Programming and Scripting

KSH script to run other ksh scripts and output it to a file and/or email

Hi I am new to this Scripting process and would like to know How can i write a ksh script that will call other ksh scripts and write the output to a file and/or email. For example ------- Script ABC ------- a.ksh b.ksh c.ksh I need to call all three scripts execute them and... (2 Replies)
Discussion started by: pacifican
2 Replies

7. UNIX for Dummies Questions & Answers

Difference Between executing llike ./myscript.ksh and . ./myscript.ksh

Hi , What is the diffence between executing the script like ./myscript.ksh . ./myscript.ksh I have found 2 difference but could not find the reason 1. If i export a variable in myscript.ksh and execute it like . ./myscript.ksh the i can access the other scripts that are present in... (5 Replies)
Discussion started by: max_hammer
5 Replies

8. Shell Programming and Scripting

different behaviour for ksh and ksh -x

I'm getting different behaviour when executing below script in debug option. $ cat ss.ksh ff=$(pwd) echo " ff : $ff" $ ksh ss.ksh ff : /tmp $ ksh -x ss.ksh + + pwd ff= + echo ff : ff : I was getting this behaviour in my actuall script i'm able to reproduce this in simple script... (4 Replies)
Discussion started by: luckybalaji
4 Replies

9. Shell Programming and Scripting

ksh help

Hi, I have command like this with ooutput : unix>tnsping abc TNS Ping Utility for IBM/AIX RISC System/6000: Version 10.2.0.4.0 - Production on 17-AUG-2011 17:06:11 Copyright (c) 1997, 2007, Oracle. All rights reserved. Used parameter files: /opt/oracle/network/admin/sqlnet.ora ... (19 Replies)
Discussion started by: talashil
19 Replies

10. Shell Programming and Scripting

ksh

Hi Dears kindly I am new here ...I want to ask your help ... I want to write AWK command when enter date like 20140129 plus 9 then it gives me 20140207 I wrote below but the result was wrong #!/bin/ksh echo "please input the data:" read a if echo $a|awk '{if... (15 Replies)
Discussion started by: shaho87
15 Replies
USE(1)								   User Commands							    USE(1)

NAME
use - Frontend to the Usepackage Environment Manager SYNOPSIS
csh and derivatives: source /usr/share/usepackage/use.csh bourne shell and derivatives: source /usr/share/usepackage/use.bsh korn shell: . /usr/share/usepackage/use.ksh use [-vs] [-f file] package ... use -l DESCRIPTION
Usepackage is an environment management program. It is based on the principle of packages - collections of executables that share a common set of necessary environment variables, such as PATH, MANPATH or LD_LIBRARY_PATH. For each given package, use sources the appropriate environment information into the current shell. The environment information is speci- fied in a configuration file, see usepackage(1). OPTIONS -v Output verbose information to the standard error stream. -s Silence warnings for un-matched packages. This is useful in a shell rc script when a package is known not to be available on all architectures that the shell is used on. -f file Specify an alternate initial configuration file. -l List available packages and groups. FILES
/usr/share/usepackage/usepackage.conf The default configuration file. /usr/share/usepackage/use.csh Shell setup for csh and derivatives. /usr/share/usepackage/use.bsh Shell setup for bourne shell and derivatives. /usr/share/usepackage/use.ksh Shell setup for ksh. /usr/bin/usepackage The underlying Usepackage executable. ENVIRONMENT
Other than the reading and re-definition of environment variables for package setup, use also uses the following environment variables for user configuration: PACKAGES_PATH Colon-separated path list giving the directories to search for configuration files. Shell-style tilde (~) user-directory escapes are expanded. HOME If present in the environment, this is used to provide the expansion for the tilde (~) user-directory. SHELL If present in the environment, the last path component of this is used for shell matching (see SYNTAX) and detecting the style of environment output that should be used, see usepackage(1). COPYRIGHT
Usepackage Environment Manager Copyright (C) 1995-2005 Jonathan Hogg This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MER- CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA SEE ALSO
usepackage(1), csh(1), sh(1), ksh(1) Usepackage $Date: 2005/12/11 16:42:09 $ USE(1)
All times are GMT -4. The time now is 04:38 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy