ulisesojeda commented on issue #13942:
URL: https://github.com/apache/airflow/issues/13942#issuecomment-971818394
Hi @tandelDipak,
In order to define custom commands (functions) you can define it in a single
line before calling.
The BashOperator is not defined to execute a script before running the
**bash_command**
**Example:**
```
run_this = BashOperator(
dag=dag,
task_id='run_bash',
bash_command="print_my_input() { echo Your input: $1 ; } &&
print_my_input 222",
)
```
**Result:**
{subprocess.py:78} INFO - Your input: 222
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]