amudelka has asked for the wisdom of the Perl Monks concerning the following question:
I am trying to run some set of commands whenever newgrp command is run. Problem with newgrp is that it opens up a new shell. So I am trying to run some clearcase commands within newgrp by making use of here-doc. Now this works fine without me trying to guide the error into an error log. If I don't use the piping as I have done below, this works fine.
system ("newgrp ankoor <<BLAH\n cleartool setview -exec \"cleartool l +n -s $rtl_compiles_dir/$new_release $topsim_dir/SIMULIBS/vcsmx/$new_ +release\" $view_name \n 2>>$0.ERR") if (!$flag_link);
I want to find a way to make the above command work or a suitable alternative would do.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: system command with here-doc
by JavaFan (Canon) on Jan 02, 2012 at 14:14 UTC | |
|
Re: system command with here-doc
by pvaldes (Chaplain) on Jan 02, 2012 at 14:59 UTC | |
|
Re: system command with here-doc
by Khen1950fx (Canon) on Jan 02, 2012 at 15:23 UTC | |
by Anonymous Monk on Jan 02, 2012 at 19:50 UTC | |
by amudelka (Initiate) on Jan 03, 2012 at 05:52 UTC | |
by Anonymous Monk on Jan 03, 2012 at 07:49 UTC |