Skip to content

Address already in use – FastAPI

I keep getting [Errno 98] Address already in use But the address is not in use. I tried to change the ip and port but It isn’t budging. uvicorn main:app –reload also tried uvicorn main:app –host=172.0.0.2 –port=5000 then it gives [Errno 99] error while attempting to bind on address (&#…

I am trying to use awk to extract a portion of each line in my file

I have a large file of user agent strings, and I want to extract one particular section of each request. For input: I am trying to get output: from after /product/ in the sample above. I’m trying to use Awk, but I can’t figure out how to get the regex expression that’s required for this. I&#…

Renaming sub-directories recursively to a new pattern in bash

I want to rename sub-directories to my new pattern but some results may be dangerous in my own script: For example if I use /tmp/etc as input argument I would have the nasty results in the first iteration: So in next iteration there will not be /tmp/etc to work at. The second problem in my script is when I us…