0

I have two files which I have to compile. I want to write something like an event based shell script which compiles first file and then the second file. Is it possible to write event based shell script that does action 2 when action 1 is completed.

Abhishek
  • 1,717
  • 6
  • 22
  • 39

2 Answers2

2

That thing is called make and it allows you to define targets, dependencies and rules.

Michael Wild
  • 24,977
  • 3
  • 43
  • 43
1

Yes, just like this:

#!/bin/sh
action1
action2
tomsv
  • 7,207
  • 6
  • 55
  • 88