LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-27-2010, 01:21 AM   #1
dmcgarrett@optonline.net
LQ Newbie
 
Registered: Jun 2010
Location: Long Island, NY
Distribution: PCLOS, Mint,
Posts: 26

Rep: Reputation: 0
find calling script


I have a file, a script which tells the computer to take some action. Call that file1. I don't want to change the name of file1 so it can't be called, as this is going to cause some kind of error.
What I want to know is what file calls file1. Then in file2, the calling file, I can comment out the call to file 1, and hopefully this will not cause an error condition.
The reason for this is that there are two conflicting actions, one in file1, one in file3, which is also called by something. I want to only call file 3, for the moment. If that doesn't solve the problem, I will go back and enable the call to file1, and disable the call to file3, and see if that works. (Probably the calls to file1 and file3 are in different scripts, not both in file2.) I'm trying to fix a bug I reported in Debian that does not seem to have any interest "upstream."
 
Old 10-27-2010, 01:46 AM   #2
T0sh1r0
Member
 
Registered: Oct 2010
Posts: 51
Blog Entries: 1

Rep: Reputation: Disabled
You can use ps -ef
Look for the PPID (Parent Process ID), this is the PID (Process id) of the calling command.

Hope this helps you
 
Old 10-27-2010, 01:59 AM   #3
Manjunath1847
Member
 
Registered: Mar 2007
Posts: 44

Rep: Reputation: 16
One more solution is - instead of commenting call to file1, just add return from the first line of its execution in file1. So even though file1 is called control returns back immediately without doing anything in file1.
 
  


Reply



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] calling bash script with more than one variable from python script mfb Programming 4 10-12-2010 06:51 AM
Calling a bash shell script from within another script dedman Linux - Software 7 04-24-2010 08:53 PM
Calling perl script and passing variable from php script hosea Programming 5 10-21-2008 08:01 AM
how to pass a variable from a called script back to the calling script steven.c.banks Linux - General 2 05-05-2008 02:00 PM
Directory listing - Calling shell script from a CGI script seran Programming 6 08-11-2005 11:08 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:14 PM.

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
Open Source Consulting | Domain Registration