Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 10-14-2010, 02:01 PM   #1
LQ Newbie
Registered: Oct 2010
Posts: 10

Rep: Reputation: 0
Learn korn shell

I am new and start learning how to write korn shell, can you someone please translate the below command to common English?

#echo "Running $0 $1 $2 $3"
Script_Dir=`dirname $0`

Old 10-14-2010, 02:32 PM   #2
LQ Addict
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
There doesn't appear to be much that's complicated. The first (uncommented) line runs the command dirname on the first command line argument (which is the script name) and stores the result in Script_Dir. The next three lines just seem to assign the values passed as the next few command line arguments to some variables.

Have you tried looking for a tutorial on KornShell scripting?

Last edited by Nylex; 10-14-2010 at 02:48 PM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
korn shell variable help 4play Programming 9 11-23-2011 12:03 PM
korn shell loop jonlake Programming 2 03-28-2008 12:10 PM
script in korn shell disruptive Programming 15 02-22-2007 10:18 AM
korn shell tutorial/course kapilcool Linux - Certification 2 11-13-2006 09:18 PM
Arrays in Korn Shell...? vous Programming 1 03-26-2005 01:35 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:12 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration