I am trying to run a simply bash script in airflow run by Docker, but it retrieves an error
file.sh
<code>#!/bin/bash
echo "$pwd"
</code>
<code>#!/bin/bash
echo "$pwd"
</code>
#!/bin/bash
echo "$pwd"
DAG
<code>bashf = BashOperator(
task_id='bashff',
bash_command=f'python /path/to/file/mybashscript.sh ',
dag=dag)
</code>
<code>bashf = BashOperator(
task_id='bashff',
bash_command=f'python /path/to/file/mybashscript.sh ',
dag=dag)
</code>
bashf = BashOperator(
task_id='bashff',
bash_command=f'python /path/to/file/mybashscript.sh ',
dag=dag)
ERROR
<code>[2024-07-22, 11:57:52 UTC] {subprocess.py:93} INFO - echo "$pwd"
[2024-07-22, 11:57:52 UTC] {subprocess.py:93} INFO - ^^^^^^
[2024-07-22, 11:57:52 UTC] {subprocess.py:93} INFO - SyntaxError: invalid syntax
[2024-07-22, 11:57:52 UTC] {subprocess.py:97} INFO - Command exited with return code 1
</code>
<code>[2024-07-22, 11:57:52 UTC] {subprocess.py:93} INFO - echo "$pwd"
[2024-07-22, 11:57:52 UTC] {subprocess.py:93} INFO - ^^^^^^
[2024-07-22, 11:57:52 UTC] {subprocess.py:93} INFO - SyntaxError: invalid syntax
[2024-07-22, 11:57:52 UTC] {subprocess.py:97} INFO - Command exited with return code 1
</code>
[2024-07-22, 11:57:52 UTC] {subprocess.py:93} INFO - echo "$pwd"
[2024-07-22, 11:57:52 UTC] {subprocess.py:93} INFO - ^^^^^^
[2024-07-22, 11:57:52 UTC] {subprocess.py:93} INFO - SyntaxError: invalid syntax
[2024-07-22, 11:57:52 UTC] {subprocess.py:97} INFO - Command exited with return code 1