Skip to content
Advertisement

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 the

How to display accented words JSON on bash script with Python

I’m trying to display arrays with accent in the result but only arrays that don’t have accent are showing. Complete themoviedb API: https://api.themoviedb.org/3/movie/566525?api_key=b2f8880475c888056b6207067fbaa197&language=pt-BR Shell code: result: Answer Here is a cleaner way to do this in jq. This solution also scales better (you don’t need to know the number of elements in your array)

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 {*,.*} will not change nothing. Wondering what

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 create the screen

Advertisement