Not sourcing .cshrc 
Author Message
 Not sourcing .cshrc

I am a relative newcomer to the wide world of PERL and I am looking for a some
help.  There are a couple of things that I have just not been able to figure out
and I hope that someone can help me without needing to see very much of the
couple thousand lines of code that these problems affect.

1) Is there a way to call another script (happens to be a c shell script in this
case) without sourcing that person's .cshrc?  This seems to be causing a problem
because of some of the special things that some people have in their .cshrc
files.  If not is there a way to point to a generic clean .cshrc?  The current
code I am using looks like:

        $R_VALUE = `rsh $HOST -n /tmp/runjstat.csh $TIME $USAGEDIR $JSTATTIME
 $LOGDIR $LOGFILENAME 2>> $LOGDIR/$ERRORFILENAME 1>> $LOGDIR/$LOGFILENAME`;

and it works fine more myself and about 90% of the other users.

2)  In a certain loop where the user will be waiting a while I want to give them
another . periodically to let them know how things are progressing.  If I use
code like:


            print".\n";               # to let user know how it is progressing

it works fine as it puts the dots in a vertical line, if I use
code like:


            print".";         # to let user know how it is progressing

(only the \n is missing) it will not print any of the dots until the entire for
loop has completed all iterations (and then of course they are in a horizontal
line).  With only this limited information I have given does anyone have any
suggestions?  Putting the code without the \n is a small test script causes it
to work fine that is why I know it is something else I have done elsewhere in my
code.  Any suggestions?

Thanks
--

James          
                                                       ))    
                                                        ))  ~~~~~
                                                        )) ~~   ~~~
___________________________________________       ______ )~______   ~  
              James S. Chapple                   /      \)/      \

 Arizona Engineering Technology & Services     /   CCCCC   H   H   \
      Intel Corporation, Chandler, AZ          |   C       H   H   |
-------------------------------------------    |   C       HHHHH   |
                                               |   C       H   H   |
                                                \  CCCCC   H   H  /
                                                 \               /
                                                  \_____/*\_____/



Wed, 19 Mar 1997 06:44:36 GMT  
 Not sourcing .cshrc



Quote:
>1) Is there a way to call another script (happens to be a c shell script in
>this case) without sourcing that person's .cshrc?  This seems to be causing
>a problem because of some of the special things that some people have in
>their .cshrc files.  If not is there a way to point to a generic clean .cshrc?

Invoking /bin/csh with the -f flag will prevent it from reading .cshrc
or .login on startup.  Set the magic line to #!/bin/csh -f

Quote:
>(only the \n is missing) it will not print any of the dots until the entire for
>loop has completed all iterations (and then of course they are in a horizontal
>line).  With only this limited information I have given does anyone have any
>suggestions?  Putting the code without the \n is a small test script causes it
>to work fine that is why I know it is something else I have done elsewhere in
>my code.  Any suggestions?

STDOUT is line buffered by default.  Set $| to nonzero to force a flush
on every print, and this problem should go away.

 -Paul Phillips



Wed, 19 Mar 1997 08:47:52 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. want perl demo .cshrc,.login

2. Sourcing from within perl ?

3. Sourcing in shell scripts into perl

4. sourcing (bash) config files within perl

5. Problems with sourcing a file

6. Problems with sourcing a file in perl.

7. Sourcing with a twist of Parsing ?

8. Sourcing Things in Perl ?

9. Help please with sourcing an environment variable

10. workaround for sourcing file from perlscript

11. Sourcing Unix environment file?

12. sourcing a file in Perl

 

 
Powered by phpBB® Forum Software