New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
system() command not handling bash redirects #12270
Comments
From pae9@leicester.ac.ukCreated by pae9@leicester.ac.ukShell redirects in commands passed through "system()" are not e.g.: system ("ls &> some_file"); Should give no standard output, but create "some_file". This is what This is particularly problematic as I have (many, many) bits of code such as system ("command1 &> command1.log"); Where command1 produces files which are then used by command2. At present, I have checked that the alternative syntax system ("command1 > command1.log 2>&1"); does work, but obviously I'd rather recover the old Perl behaviour than Perl Info
|
From @jkeenanOn Fri Jul 13 01:45:21 2012, PhilEvans wrote:
Assuming I understand your post correctly, I cannot reproduce the errant On Darwin/PPC: Similar results using Perl 5.16.0 and 5.14.0 on Linux/386. Thank you very much. |
The RT System itself - Status changed from 'new' to 'open' |
From @janduboisOn Fri Jul 13 01:45:21 2012, PhilEvans wrote:
I suspect that your /bin/sh is no longer a symlink to /bin/bash but to This change is unrelated to your choice of interactive shell. If you |
From @ikegamiOn Fri, Jul 13, 2012 at 5:45 PM, James E Keenan via RT <
Perl doesn't use bash. It uses sh. If you want to use bash, use system ("bash", "-c", "ls &> some_file"); |
@ikegami - Status changed from 'open' to 'resolved' |
@ikegami - Status changed from 'resolved' to 'rejected' |
From tchrist@perl.com
That's the correct behavior. system uses Bourne shell syntax, --tom |
Migrated from rt.perl.org#114120 (status was 'rejected')
Searchable as RT114120$
The text was updated successfully, but these errors were encountered: