LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 02-21-2012, 11:19 PM   #16
brian00
Member
 
Registered: Aug 2011
Posts: 33

Original Poster
Rep: Reputation: Disabled

First of all, thanks for all of the inputs and valueable advices.

I guess Jhwilliams is correct, something is messed with my shell on this server b/c the same script is working on another server. The only thing different is this server is Linux and the other one in Solaris. Rather than fixing the code, I think it's best for me to find out what's going with the shell on this server.

Any advices for me to find out what's going on with this server?

Thanks all,
 
Old 02-21-2012, 11:31 PM   #17
jhwilliams
Senior Member
 
Registered: Apr 2007
Location: Portland, OR
Distribution: Debian, Android, LFS
Posts: 1,168

Rep: Reputation: 210Reputation: 210Reputation: 210
@brian, actually, catkin has it. the prefixed - comes from login. If you run the code in a pseudo-terminal, it disappears. Replacing $0 with ${0#-} is a fine solution to the problem. Nothing wrong with your shell, I take it back.
 
Old 02-21-2012, 11:36 PM   #18
uhelp
Member
 
Registered: Nov 2011
Location: Germany, Bavaria, Nueremberg area
Distribution: openSUSE, Debian, LFS
Posts: 205

Rep: Reputation: 43
So this is just a login shell.
Except for the csh I think all shells show a "-" before.

Code:
man bash | grep -A3 -E -e  '^INVOCATION$'
 
  


Reply


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
[SOLVED] basename with command substitions and xargs dugan Programming 3 06-21-2011 10:58 AM
“basename $0” returns basename: -k: unknown option jaideepca Linux - Newbie 6 11-09-2009 06:30 AM
How to get the 'basename' (or what other.?) command to do what I want..? craftybytes Programming 1 02-13-2008 07:27 AM


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

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