Sunday, 14 February 2021

Spring Shell: Run a batch of commands

Using ‘script’ command, we can provide collection of commands in a file and execute them one by one.

 

batch.shell

add 10 20
sub 10 20
mul 10 20
div 10 20

greet-user Krishna

 

Execute batch.shell file using script command.

shell:>script /Users/krishna/examples/batch.shell
30
-10
200
0
Hello Krishna!!!!

 

  

Previous                                                    Next                                                    Home

No comments:

Post a Comment