Код: Выделить всё
for i in {1..10}; do
echo $i;
done;
Код: Выделить всё
$ ./test.sh
1
2
3
4
5
6
7
8
9
10
Код: Выделить всё
import subprocess
print(subprocess.check_output("./test.sh", shell=True))
Код: Выделить всё
b'1\n2\n3\n4\n5\n6\n7\n8\n9\n10\n'
Код: Выделить всё
b'{1..10}\n'
>
Подробнее здесь: https://stackoverflow.com/questions/791 ... rom-python
Мобильная версия