Linked Questions

175 votes
11 answers
528k views

I read this somewhere a while ago but cant seem to find it. I am trying to find a command that will execute commands in the terminal and then output the result. For example: the script will be: ...
CurveGamma's user avatar
  • 4,599
24 votes
3 answers
101k views

I am trying to run both Python and bash commands in a bash script. In the bash script, I want to execute some bash commands enclosed by a Python loop: #!/bin/bash python << END for i in range(...
Md. Zakir Hossan's user avatar
15 votes
1 answer
41k views

I am currently executing bash commands manually, by entering in shell in the python code. How would one do this in the pythonic way? i am currently using os.system function to execute commands like; ...
jagmitg's user avatar
  • 4,576
0 votes
2 answers
8k views

I'm trying to run a long bash command with several pipes inside. I did some research and found the use of os.chdir() to change to a working directory, and subprocess to execute bash commands. First I ...
Christina Do's user avatar
3 votes
1 answer
4k views

I read this question in which the asker is having a specific problem with running bash in Python using code like this: os.system(bashCommand) The top two answers simply say: "use subprocess" (instead ...
Joseph Hansen's user avatar
1 vote
2 answers
1k views

So using my linux terminal, I can run a command to download all pdfs from a website wget -A pdf -m -p -E -k -K -np http://site/path/ but I want to automate the process. For example run the command ...
x89's user avatar
  • 3,522
-1 votes
2 answers
601 views

I want to convert some PDF file to TXT file in a bash script. pdf2txt.py -o otuput.txt input.pdf this is the command to do the task for a single file. But for large set of file I am trying to do the ...
Md. Zakir Hossan's user avatar
0 votes
1 answer
848 views

I have two files as below and I want to loop over the two files to create different combinations based on line in each file then input them as i and j to bash script in python: file1 aaaa tttt cccc ...
Apex's user avatar
  • 1,096
0 votes
0 answers
441 views

I am creating a simple web server with Flask which will receive the request, do some processing and kick off a Terraform to build some resources in the cloud. Not sure if this is the best way but I've ...
CaioT's user avatar
  • 2,241
0 votes
1 answer
373 views

So I just recently started having interest and playing CTF's on OverTheWire website and I am still in the first challenge called the bandit Lvl5 if you'll consider looking at it. So it teaches the use ...
user avatar
0 votes
1 answer
253 views

I am trying to make a button the command: print("test"). Here is what I have so far: import os root = tk.Tk() button = tk.Button(text="print", fg="black&...
Phudge's user avatar
  • 1
0 votes
0 answers
218 views

I'm running some bash codes from python using subprocess module, E.G. import subprocess container_logs = 'az container logs --name textgeneratorinference' subprocess.call([container_logs],shell=True)...
Luis Ramon Ramirez Rodriguez's user avatar
1 vote
0 answers
141 views

I have this bash script I want to call directly from Python: #!/bin/bash for usb in $(ls /dev/ttyUSB*); do echo $(udevadm info $usb | grep ID_SERIAL= | cut -d ' ' -f 2) $usb; done I'm getting error ...
CIsForCookies's user avatar
-2 votes
1 answer
143 views

So I found this tool: https://github.com/elceef/dnstwist and I want to pass a list of domains into that tool then take the output and visualize it. It operates through the command line, but how do I ...
Monlist's user avatar
0 votes
1 answer
79 views

I wrote python script to run bash script it runs it with this line: result = subprocess.Popen(['./test.sh %s %s %s' %(input_file, output_file, master_name)], shell = True) if result != 0: print("...
LeTadas's user avatar
  • 3,576

15 30 50 per page
1
2 3 4 5
13