Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Creating a custom command shell using perl

Status
Not open for further replies.

rickyice

Junior Member level 2
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.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top