Skip to content

Tag: bash

Bash for loop containing python script

New here! I’m trying to loop a python script in bash that gets stats from fastq files. I want it to loop through all the fastq files in a directory and save the outputs in a text file. Ideally don’t want to edit the python script This is the script that works when I’m not looping it: This is…

Curly braces in os.system on python

In the linux terminal i can delete all files from directory including hidden ones with: I’m trying to run the following command via os.system in python: this will exit without any error (exit code 0) but do not delete nothing. I understand here probably the curly braces have a special meaning but trying…

redirecting screen output from python logging to a file

How can I redirect the output of python logging statements to a file at run time using redirection? I am using python 3.7 in Debian. When I redirect the output from a python script containing a print statement to a file, I get the expected result – a file containing the output. If I use logging.debug to…