Category : bash

I have two large files (sets of filenames). Roughly 30.000 lines in each file. I am trying to find a fast way of finding lines in file1 that are not present in file2. For example, if this is file1: A=1 B=2 C=3 And this is file2: A=10 B=20 C=30 D=5 Then my result/output should be: ..

Read more

I am running a script related to ssm session in aws-cli. When I run it, I get a warning… /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/OpenSSL/crypto.py:12: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in the next release. However, if I run… python –version I ..

Read more

I am currently working through the Narnia CTF. I am on level 1. In level 1, we have a program that calls an environmental variable. We are allowed to change this environmental variable. When I try to set the environmental variable to some hex-code like so, the program throws a seg-fault. export EGG="xebx11x5ex31xc9xb1x21x80x6cx0exffx01x80xe9x01x75xf6xebx05xe8xeaxffxffxffx6bx0cx59x9ax53x67x69x2ex71x8axe2x53x6bx69x69x30x63x62x74x69x30x63x6ax6fx8axe4x53x52x54x8axe2xcex81" I looked ..

Read more

I have a series of folders that need renaming due to lightrooms inability to use real value filename sorting they tend toward this pattern FilenameOfDifferentLength001_002.jpg FilenameOfAnotherLength_002a (1).jpg FilenameOfManyLengths_006b (27).jpg etc etc i need to only pad zeroes on the numbers inside the parenthesis to a 3 digit value (so 001 upto 999) there will be ..

Read more

So, I got Mac with M1 at my work place for programming and it needs some workaround to run code (not only with Rosetta, because you need to resolve libraries LD/C/CPP pathes in environment variables). I basically rolled out my own workaround in bash that is able to run x86 commands without a hussle (I ..

Read more

I am using a bash script (run.sh) to run a python file (calculate_ssp.py). The code is working fine. The folder structure is given below ├── dataset └── dataset_1.csv ├── Dockerfile ├── __init__.py ├── output ├── run.sh ├── scripts │   ├── calculate_ssp.py │   ├── __init__.py The bash script is #!/bin/bash python3 -m scripts.calculate_ssp 0.5 Now, I ..

Read more