I am trying to remove a directory /path/to/dir using the rm -rf command. Unfortunately I get the error rm: cannot remove '/path/to/dir/.nfsdda293a660f276ca00000
I changed my prompt as: c=$(basename $CONDA_DEFAULT_ENV) export PS1='[\h] -\e[0;36m$c\e[0;37m (\W) 🤞 \e[0;52m' In ~/.bashrc. The first newline
I have a text file 1.txt which has following content: module abc I am trying to generate multi-line string that I need to add before module abc line in 1.txt.
I am writing a bash script that calls an external program which generates a zip file of the form ########.zip which the '#'s# can be any decimal digit. There i
I have a series of log files that are all text. If a certain error happens it results in binary being inserted in the text. I want a Python or Bash script that
How can I raise an error in bash if a directory at some path does not match the below permissions? u=rwX,g=rwX,o=rwX
I have written a script to create a loop for a software I'm running: #!/bin/bash declare -a pops=("pop1" "pop2" "pop3") for target in "${pops[@]}"; do while I
I am creating a telegram bot to send the information that I request to the app. When I run the code below it works fine except for the last part, when it does t
This is my two column sequence, I want to combine them into 1 column and sort them in Linux, but I don't know how to write the shell script to handle them.
I am running the following in a script: pubkey=$(gpg2 --verbose --export-ssh-key $EXPORT_THIS_ID) sshpass -p$REMOTE_PASS ssh -o IdentitiesOnly=yes -o StrictHost
I have a c++ executable named Test. I want to find out the GetExitCodeProcess() code when the execution is completed. I can find out the status code by writin
Having trouble updating my global variable in this shell script. I have read that the variables inside the loops run on a sub shell. Can someone clarify how thi
What would be the best way to count the number of characters that are different between strings in two files. I know how to do this in Python but I need a bash
Is there a standard linux terminal program that when given text input (in standard in) returns a 1 and 0 if no text is provided? (The reverse logic would also b
Here is file1.txt: .apple .ball .cow .apple .cow .tea .mine.nice .mine.nice .tea .zebra Here file2.txt .apple .mine.nice .cow .tea Expected Result: .apple .co
I have a Dockerfile using which I am trying to build an image. I wish to have multiple inputs fetched from the user from STDIN, when the build runs. To get star
I am trying to add a waiting point to my code which can then be resumed/unblocked manually. Sadly it is not working as expected. I guess due to how heredoc work
I have this bash statement: if ls > /dev/null 2>&1 -a ls > /dev/null 2>&1; then echo "true"; else echo "false";
I want to replace the nth charater of a line to '.', with n being line dependent and can be provided on the line itself, e.g. a example file can look like this:
I have 600 CSV files of size ~1Mo for a total of roughly 600Mo. I want to put all of them into a sqlite3 db. So my first step would be to merge them into one bi