Creating a project template from an executable file
First, open a new file using nano:
sudo nano videofile
Next, add your tasks, separated by a new line:
Then just add “task add” to the front of each line:
task add record video
task add edit video
task add upload video
Now exit the file and save:
ctrl + x y
And now we can make the file executable:
Now we can create all those tasks simply by executing that file: `./videofile` NOW, in order to bake in the dependencies, we need to add some stuff to the line items in the file. So we go back into that file: ```sudo nano videofile``` And change the first line to ```recordstring=`task add record video```` Then enter a new line beneath that: ```recordid=`echo $recordstring | grep -o -E '[0-9]+'```` Then just repeat that process for each task. The last thing we need to do is use the variable for the _id_ in the creation of the task. So the task for editing the video will look like this:
task add edit video $recordid
echo $recordstring | grep -o -E '[0-9]+'
Drop a comment below if you have any questions.
Check out these related posts