|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
redirect output to log file
hello all, I'm invoking the program generate-report using backticks from my perl program and redirecting the output to the log file sge-stderr.log. But when i check the process using ps command it is spawing two processes where the below code is parent process and the program generate-report as child. Please help me out of how to redirect the output to the log file without spawing two process. Code:
`/usr/bin/perl /opt/finance/bin/generate-report $urid 2>> /opt/finance/logs/sge-stderr.log`; Thanks a ton, raj |
| Sponsored Links | ||
|
|
#2
|
||||
|
||||
|
When you use the system() or the backticks in perl, the program will do a fork and exec. This will result in two processes. Why is there a restriction on the number of processes that you can create?
|
| Sponsored Links | ||
|
|
#3
|
|||
|
|||
|
one process has sh -c at the beginning of /usr/bin/perl /opt/finance/bin/generate-report $urid 2>> /opt/finance/logs/sge-stderr.log at the beginning and actual program opt/finance/bin/generate-report $urid is running which is the child process of first one.
Will there be any impact or two processes are making the same program running twice... iam confused Please explain me... |
| Sponsored Links | ||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to redirect output of ls to a file? | girish.raos | Shell Programming and Scripting | 6 | 09-21-2010 05:13 AM |
| Redirect the output to a .xls file | anupdas | Shell Programming and Scripting | 5 | 01-25-2010 03:26 AM |
| redirect output to a file name | csecnarf | UNIX for Dummies Questions & Answers | 7 | 06-16-2008 03:45 AM |
| redirect output to file | xadamz23 | Shell Programming and Scripting | 4 | 06-29-2006 11:20 AM |
| redirect output to file? | slackware | Shell Programming and Scripting | 1 | 09-12-2003 02:57 AM |
|
|