Skip to content
Advertisement

Tag: linux

Bash script conversion to fish

I’m trying to convert this script to fish: https://github.com/masahide/OmniSSHAgent/blob/main/hack/ubuntu-bash.setup.sh This is my progress so far: It should be fully converted except that main command substitution in the last function: that raises this error: And I don’t understand how to convert it. Can you help me? Thanks Answer Found the correct way to convert it (thanks to @masahide: https://github.com/masahide/OmniSSHAgent/issues/16#issuecomment-1107446991):

Slurm job arrays don’t work when used in argparse

I am trying to run multiple things at once (i.e. in a parallel manner) with different values of the variable –start_num. I have designed the following bash script, Then, I ran sbatch –exclude master array_bash_2, but it doesn’t work. I have tried searching many sites and have tried multiple things, but still the error FINAL_ARGPARSE_RUN.py: error: argument –start_num: expected one

How to use Ansible to add Linux environment variables

I’m trying to add environment variables to a Linux machine using vars like below: I’m using this task to add the variables to /etc/environment. But I’m getting the error below: What am I missing here? Answer The playbook below works as expected and created the file I only added the parameter create: true to avoid error msg: Destination /tmp/environment does

If grep value not found return an echo [korn shell]

I have an issue with this script. What I’m trying to do is there are 3 conditions: 1- i put a valid input that is found inside the file and it gives me the output 2- I put a wrong input that can’t be found inside the file and give me an output of “Value not Found” 3- I don’t

Advertisement