LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 03-02-2012, 06:20 AM   #1
prravin1
Member
 
Registered: Feb 2012
Location: India
Posts: 43

Rep: Reputation: Disabled
Unhappy How to process the output folder created by one script


I have a script (first.sh) which creates a output folder at a particular location.Now a second script (second.sh) need the location of this output folder as it need to process the data into it.

Keep in mind that the first.sh script will generate the output folder as per the user needs.(as per path set by the user).

Now i need the second.sh script to find the path of the output folder generated by first.sh script and then it should enter into it for processing some data?

I need the logic for the above problem. Also remember that the path for output folder always changes and the second.sh script should be able to find the exact path and output folder.

first.sh /add/sub/output_folder (user decides the output path)

second.sh
It should find the "/add/sub/output_folder" location

Hope it helps.Plz help me.
 
Old 03-02-2012, 06:46 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Answer is given in the following thread: Selecting output as a directory path (post #5 and beyond).
 
Old 03-05-2012, 06:03 PM   #3
ta0kira
Senior Member
 
Registered: Sep 2004
Distribution: FreeBSD 9.1, Kubuntu 12.10
Posts: 3,078

Rep: Reputation: Disabled
Quote:
Originally Posted by prravin1 View Post
I need the logic for the above problem. Also remember that the path for output folder always changes and the second.sh script should be able to find the exact path and output folder.
I recommend having it explicitly specified to both scripts up front, then. Fewer things are more annoying than automation that doesn't work like it's supposed to, especially when there is a trivial "manual" procedure that gets it right every time (like those faucets with the IR sensors that don't work correctly.)
Kevin Barry
 
1 members found this post helpful.
  


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
Shell script to monitor files created on a folder cmadiam82 Programming 9 05-11-2013 12:59 AM
I need a linux script that will validate the date created on a folder ghost_1on Programming 6 02-09-2012 01:40 PM
[SOLVED] Bash shell script to check the if empty files are being created & start the process hussa1n Linux - General 8 06-29-2010 05:49 PM
shell script ssh: how to eliminate the login process output figo Programming 1 06-01-2009 02:05 PM
shell script to read ps -e output and determine process double processes. dr_zayus69 Programming 1 09-21-2005 05:37 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

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