Unix/Linux Go Back    


Shell Programming and Scripting Unix shell scripting - KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and shell scripts and shell scripting languages here.

Need Help on File processing

Shell Programming and Scripting


Closed Linux or Unix Question    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 12-03-2012
rameshds rameshds is offline
Registered User
 
Join Date: Apr 2012
Last Activity: 26 June 2014, 11:31 PM EDT
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Need Help on File processing

I have a shell script, which calls number of other shell scripts and some of these shell scripts will call some other shell scripts.

The same is as follows
Quote:
mainksh.ksh
[step1]="$RUN_DIR/calling1.ksh"
[step2]="$RUN_DIR/calling2.ksh" "$SUB_DIR/sub/v1/calling21.ksh"
"$RUN_DIR/calling3.ksh"

calling1.ksh
"$RUN_DIR/$SUB_DIR/calling101.ksh"

calling101.ksh
"$RUN_DIR/$SUB_DIR/calling1011.ksh"
I was trying to write shell script which will be return the output in the below format
I need the output as mentioned below
Quote:
mainksh.ksh /usr/local/ramesh/run/calling1.ksh
mainksh.ksh /usr/local/ramesh/run/calling1.ksh /usr/local/ramesh/run/cfg/calling101.ksh
mainksh.ksh /usr/local/ramesh/run/calling1.ksh /usr/local/ramesh/run/cfg/calling101.ksh /usr/local/ramesh/run/cfg/calling1011.ksh
mainksh.ksh /usr/local/ramesh/run/calling2.ksh (/usr/local/ramesh/run/cfg/sub/v1/calling21.ksh)
mainksh.ksh /usr/local/ramesh/run/calling3.ksh

Last edited by rameshds; 12-03-2012 at 04:37 AM..
Sponsored Links
    #2  
Old Unix and Linux 12-03-2012
michaelrozar17's Unix or Linux Image
michaelrozar17 michaelrozar17 is offline
Registered User
 
Join Date: Jul 2010
Last Activity: 24 November 2014, 9:59 PM EST
Location: IN
Posts: 892
Thanks: 14
Thanked 182 Times in 173 Posts
What/Where is the input file ?
Sponsored Links
    #3  
Old Unix and Linux 12-03-2012
rameshds rameshds is offline
Registered User
 
Join Date: Apr 2012
Last Activity: 26 June 2014, 11:31 PM EDT
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
User has be pass mainksh.ksh as parameter and $RUN_DIR will be initialized with /usr/local/ramesh/run/ and $SUB_DIR with /usr/local/ramesh/run/cfg in env setting file
Sponsored Links
Closed Linux or Unix Question

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Unix or Linux Image More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to make parallel processing rather than serial processing ?? Samb95 Shell Programming and Scripting 0 08-16-2010 03:56 AM
how to change the current file processing to some other random file in awk ? salman4u Shell Programming and Scripting 2 03-02-2009 03:35 AM
Checking for a control file before processing a data file purna.cherukuri Shell Programming and Scripting 4 09-01-2008 10:52 AM
Have a shell script check for a file to exist before processing another file heprox Shell Programming and Scripting 3 11-14-2006 02:26 AM



All times are GMT -4. The time now is 05:00 AM.