Skip to content

Latest commit

 

History

History
53 lines (41 loc) · 858 Bytes

File metadata and controls

53 lines (41 loc) · 858 Bytes
title description linkTitle menu
Scripts
Scripts
main
parent weight
task-syntax
3

Task Scripts

A script is what defines a tasks behaviour.

Syntax

To define a script you must add a code block under the name of a task.

In Markdown:

## Tasks
### Task1
```
echo "Hello 世界!"
echo "Hello العالمية!"
echo "Hello ертөнц!"
```

Or in org-mode:

** Tasks
*** Task1
#+begin_src bash
echo "Hello 世界!"
echo "Hello العالمية!"
echo "Hello ертөнц!"
#+end_src

Shebangs

To define an alternative interpreter such as python, then include a shebang, similar to the unix style.

xc will parse this and create a temporary file that will be executed using the specified interpreter.

## Tasks
### python-task
```
#!/usr/bin/env python
print("foo")
```