Share your knowledge at the LQ Wiki.
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 12-06-2010, 12:07 AM   #1
LQ Newbie
Registered: Dec 2010
Posts: 1

Rep: Reputation: 0
How to find out which shell script called?


I have two shell scripts:
echo "First script"
echo "Now calling second one"
echo "Second script"
In this shell script, I want to print out which shell script called this. In this case, called So, I want to print out "".

How to achieve?

Old 12-06-2010, 01:00 AM   #2
Senior Member
Registered: Aug 2004
Location: England
Distribution: Ubuntu
Posts: 1,039

Rep: Reputation: 97
man ps

check out parent processing id


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
Displaying Graphical Output from a PAM called Shell Script Sturmovik Linux - General 1 11-26-2009 05:45 PM
Shell script: can you tell if a script is called via an alias? BrianK Programming 11 10-01-2009 11:16 AM
Linux based java decompiler to be called from shell script rakeshrau Linux - Newbie 2 06-25-2009 08:40 AM
custom shell script interpreter is not called on my vserver empgodot Linux - Server 2 05-31-2009 07:40 AM
Writing shell script called "convert" bluewolf Programming 3 02-04-2003 10:52 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:07 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