Last active
January 4, 2023 08:25
-
-
Save ddbs/f89969576ce32ced65c1fcd3bfaaf0f2 to your computer and use it in GitHub Desktop.
run bash script from python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
cmd = 'wget -O products.csv --user="xxx" --password="xxx" http://online.xxx.com/download_xxx_products.php' | |
os.system(cmd) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
cmd = 'bash download.sh' | |
os.system(cmd) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "Downloading products file.." | |
wget -O products.csv --user='xxx' --password='xxx' http://online.xxx.com/download_xxx_products.php | |
echo "Downloading customers file.." | |
echo "Downloading orders file.." | |
echo "Tasks completed." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment