James Hameson
James Hameson

Reputation: 341

Executing OS Commands from Spring Shell

I'm using

org.springframework.shell:spring-shell-starter:2.0.0.RELEASE 

With gradle and Spring

My question is: Is there anyway to open vi or vim to edit a file in the OS from the shell?. if not what alternatives do I have to edit this file?

Regards

James

Upvotes: 0

Views: 540

Answers (1)

Simmant
Simmant

Reputation: 1513

I m not pretty sure with Spring, but with in Java you can, using ProcessBuilder and moreover it will help you to execute multiple command sets.

Quick look: https://www.geeksforgeeks.org/java-lang-processbuilder-class-java/

Upvotes: 1

Related Questions