On 10-05-18 08:51 AM, Chaitanya Yanamadala wrote:
Can't exec "history": No such file or directory at cmd.pl line 33,<STDIN>
line 1.
------------------------------
so what could be wrong
i am running this under the cent os 5.4 and the perl version is 5.8.8
"history" is a built-in shell command for bash(1). When you run a
system() in Perl, it uses the POSIX shell sh(1). sh(1) does not have a
history command, so you get the error.
You could try running it with bash(1):
system( "bash -c history" );
but you might not get anything in return since this is a new process of
bash(1).
--
Just my 0.00000002 million dollars worth,
Shawn
Programming is as much about organization and communication
as it is about coding.
I like Perl; it's the only language where you can bless your
thingy.
Eliminate software piracy: use only FLOSS.
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/