Review your favorite Linux distribution.
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 08-25-2010, 02:32 AM   #1
LQ Newbie
Registered: Aug 2009
Posts: 5

Rep: Reputation: 0
looking for alternative to $0 in bourne shell

I am looking for an alternative to using $0 in bourne shell. I am in the process of migrating all my production shell scripts to a new tool that will automate execution and release of "jobs" in my production system.

And this tool does not like the usage of $0. Which means echo $0 or "basename $0" returns null.

Any ideas ? please enlighten me.

Thank you all so much ,

Old 08-25-2010, 02:41 AM   #2
LQ Guru
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Hi -

It doesn't sound like a very good tool

What about this:

a) you exported "$0" to SOME_VARIABLE_NAME_THATS_NOT_ZERO

b) call your script (which now has "SOME_VARIABLE_NAME_THATS_NOT_ZERO" defined in its environment)?

Just a thought

Last edited by paulsm4; 08-25-2010 at 02:42 AM.
Old 08-26-2010, 11:47 AM   #3
LQ Newbie
Registered: Aug 2009
Posts: 5

Original Poster
Rep: Reputation: 0
Thank you for your response. I thought so on the same line as well. Hoping the tool vendors will respond to my query.


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
Programming in Bourne Shell sourkeys Programming 6 03-14-2010 01:12 PM
xargs bourne shell bazzano Programming 5 04-16-2009 08:11 AM
'sh' shell - Actually calls legacy Bourne shell, or uses system default? Dtsazza Linux - Software 1 10-28-2005 10:20 AM
Bash Shell vs Bourne infamous41md Linux - Newbie 14 04-11-2003 11:16 PM
Bourne Again SHell help MagInnovision Linux - Newbie 2 02-04-2003 04:43 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:51 PM.

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