Creating a custom command shell using perl

Status
Not open for further replies.

rickyice

Junior Member level 2
Joined
Jun 7, 2006
Messages
22
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,428
Hi I need to create a simple command shell in Perl, however I am throughly stumped on where to begin. I would like to encorporate some basic sh files into it. Any suggestions on where to start???

Anything you could give me would help
Thanks
 

every perl script is cmd, just put this on very first line...

Code:
#!/usr/bin/perl

then on shell, write this cmd
(> is shell prompt)
Code:
> chmod +x script_name

and "encorporate" existing sh files in script:
use "system" (if you donot want shell script output in Perl)
or use `` (backquotes, if you want shell script output in Perl)

Code:
system("script1.sh"); #shell output not required
$var = `script2.sh`; #shell output required
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…