The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Parse for errors shell script bubba112557 Shell Programming and Scripting 2 04-02-2009 12:25 PM
How to: Parse text string into variables using Korn shell shew01 Shell Programming and Scripting 7 05-23-2008 11:01 AM
Parse a string in XML file using shell script ayhanne Shell Programming and Scripting 46 01-09-2008 12:33 PM
How to parse config variables from external file to shell script pradsh Shell Programming and Scripting 2 07-09-2007 03:21 PM
shell scripts that parse log files trueman82 Shell Programming and Scripting 4 11-22-2006 06:09 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 02-21-2005
bliss bliss is offline
Registered User
  
 

Join Date: Feb 2005
Posts: 2
How to parse large numbers of shell scripts

I am trying to parse hundreds of shell scripts to determine how they related to each other. Ideally for every script, I would get an output of:
  • What other scripts it calls
  • What files it reads
  • Environment variables it accesses

Any ideas on how to do this?

TIA!
  #2 (permalink)  
Old 02-21-2005
dreaming1 dreaming1 is offline
Registered User
  
 

Join Date: Feb 2005
Posts: 3
Sounds like you would have to parse each script individually and then search the script for calls to other scripts. Definately a job for PERL. Can you give a sample of what you want. Are you searching a directory for scripts and parsing or the whole filesystem, or an inputted path? Maybe you give us a little more information.
  #3 (permalink)  
Old 02-22-2005
bliss bliss is offline
Registered User
  
 

Join Date: Feb 2005
Posts: 2
I have a CVS tree that has all the scripts in it, I simply want to have output like:
Code:
Script_Name        Calls Script        Reads File        Creates file
----------------------------------------------------------------------
sample.sh          otherscr.sh         datafile.out      sampleout.out 
sample2.sh         onemore.sh                            output.out
script2.sh         sample.sh
For each script in the directory tree. That is, just parse the script and tell me what other scripts it calls, what files it reads, and what files it creates.

TIA
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 11:56 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0