The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
TimeStamp clarification Sreejith_VK Shell Programming and Scripting 2 04-09-2008 01:07 AM
need clarification about tr -d command ? vparunkumar Shell Programming and Scripting 7 03-18-2008 11:08 AM
Sun Unix command clarification FredSmith SUN Solaris 4 07-12-2007 02:30 AM
sgid suid help --need clarification StrengthThaDon UNIX for Dummies Questions & Answers 5 03-06-2007 05:45 PM
Clarification abt .profile,config,env sarwan High Level Programming 0 03-10-2006 06:16 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 04-13-2007
ravi.sadani19 ravi.sadani19 is offline
Registered User
  
 

Join Date: Jul 2005
Posts: 42
Need clarification

Hi All,

I am using Korn Shell HP UNIX and i am writing my scripts with filename extension as ksh or sh ..
I want to know what is the difference if i am giving ksh and sh

Other thing when we execute the shell script either we make it as executable and run directly else we give '.' or 'sh'
What '.' and 'sh' stands for and what make them to execute the script.

Thanks
  #2 (permalink)  
Old 04-13-2007
anbu23 anbu23 is offline Forum Advisor  
Registered User
  
 

Join Date: Mar 2006
Location: Bangalore,India
Posts: 1,398
Quote:
I am using Korn Shell HP UNIX and i am writing my scripts with filename extension as ksh or sh ..
I want to know what is the difference if i am giving ksh and sh
Extension does not matter whether it is ksh or sh or anything. Nothing is going to be affected by the extension

Quote:
Other thing when we execute the shell script either we make it as executable and run directly else we give '.' or 'sh'
What '.' and 'sh' stands for and what make them to execute the script.
. ./scriptname default shell runs the scriptname in the same shell
sh scriptname - bourne shell runs the scriptname in a new shell
You can use any of the above one to execute the script.
  #3 (permalink)  
Old 04-13-2007
ravi.sadani19 ravi.sadani19 is offline
Registered User
  
 

Join Date: Jul 2005
Posts: 42
Hi,
for what 'sh' stands for i understood that '.' you are running in current shell but exactly what information 'sh' will give to kernel or how kernel know that whatever proceeding with 'sh' needs to be executed
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 04:23 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0