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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
04-08-2012, 09:15 PM
|
#1
|
LQ Newbie
Registered: Apr 2012
Posts: 2
Rep: 
|
executing perl script inside shell script
Hello,
I am making one shell script, that at one point calls a perl script. I am able to get it to execute the perl script, however, I am wondering if there is any way to send commands after execution (by running the script in the background?) For example, the perl script takes in text entered by a user in multiple categories, allowing the user to proceed to the next category using ctrl+d, then upon completion generates email from the input data, I'd like to execute the perl script from my csh script and send it input data for each category. Would this be possible? Any help or suggestions of other ways to accomplish this I might not of thought of would be greatly appreciated.
Thanks!
|
|
|
04-09-2012, 01:26 AM
|
#2
|
LQ Guru
Registered: Sep 2009
Location: Perth
Distribution: Arch
Posts: 10,035
|
I am not sure I follow? If you are running the perl script inside your csh script, are you saying it is not asking you to enter the data mentioned?
|
|
|
04-09-2012, 03:07 AM
|
#3
|
LQ Newbie
Registered: Apr 2012
Posts: 2
Original Poster
Rep: 
|
clarification
Hello,
Sorry not the easiest thing to explain. The perl script executes normally from the c shell script, and it's prompting me to enter the input data manually. However, I am trying to get it so that I can send it the input data directly from my csh script instead of the the user having to input the data manually. Is that possible?
Thanks again!
|
|
|
04-11-2012, 09:30 AM
|
#4
|
LQ 5k Club
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
|
By your description, it sounds like the Perl script needs to see an EOF to terminate it's read()s. That makes it tricky, because your C-Shell script would have to iteratively redirect some of it's content, probably using a 'here'document' concept. I cannot envision any way to accomplish that. It would be better to use some delimiter other than EOF, such as a blank line, or a line with only a '.' (period), which are both somewhat conventional. Perhaps post a fragment of the Perl code that shows how your iterative read()s are being done.
--- rod.
|
|
|
All times are GMT -5. The time now is 07:07 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|