Create Simple Terminal Scripts with Juliar.Future sysExec

July 4, 2017 | Views: 2865

Begin Learning Cyber Security for FREE Now!

FREE REGISTRATIONAlready a Member Login Here

Hello all,
I haven’t posted an Op3n in a while. I’ve been very busy. In this tutorial, we will learn the power of a new Juliar command: sysExec()

sysExec() allows you to execute Command Prompt and Terminal commands right inside of Juliar. You might be thinking why would you want to use Juliar to create scripts that you can just create in bash?

Simple: Organization and Juliar Features.

Juliar allows you to create complex scripts place them into different files and create a Juliar lib. Since sysExec returns the output back to Juliar, you have access to chain different commands and use Juliar commands such as convenient loops, variable declaration, etc…

How do you use the Juliar sysExec() command?
Simple – See below:

function main() = {
      string output = sysExec('dir');
      printLine(output);
}

Please note that sysExec is OS independent. So, sysExec() should output the listing of directories on any OS.

NOTE: New versions of Juliar will attempt to use PowerShell instead of Terminal in order to have access to similar bash commands. This will allow you to write all commands “bash” style.


For more information visit https://juliar.org and ask questions on our forums at https://juliar.org/forums

Share with Friends
FacebookTwitterLinkedInEmail
Use Cybytes and
Tip the Author!
Join
Share with Friends
FacebookTwitterLinkedInEmail
Ready to share your knowledge and expertise?
Comment on This

You must be logged in to post a comment.

Our Revolution

We believe Cyber Security training should be free, for everyone, FOREVER. Everyone, everywhere, deserves the OPPORTUNITY to learn, begin and grow a career in this fascinating field. Therefore, Cybrary is a free community where people, companies and training come together to give everyone the ability to collaborate in an open source way that is revolutionizing the cyber security educational experience.

Cybrary On The Go

Get the Cybrary app for Android for online and offline viewing of our lessons.

Get it on Google Play
 

Support Cybrary

Donate Here to Get This Month's Donor Badge

 
Skip to toolbar

We recommend always using caution when following any link

Are you sure you want to continue?

Continue
Cancel