I have a bash array X=("hello world" "goodnight moon") That I want to turn into a json array ["hello world", "goodnight moon"] Is there a good way for me
I am queuing multiple jobs in SLURM. Can I limit the number of parallel running jobs in slurm? Thanks in advance!
I have a file called diff.txt. I Want to check whether it is empty. I wrote a bash script something like below, but I couldn't get it work. if [ -s diff.txt ] t
I would like to route a file descriptor to multiple places at the same time. For instance I would like every command in my script to print stdout to /dev/ps/9
I need to copy all *.jar files from a directory maintaining the folder structure of the parent directories. How can I do it in UNIX/Linux term
I'm trying to log into my-server through a jump server, jump.example.com. I can successfully log into the jump server without a password request: ssh -i .ssh/id
Here is a minimal working example: I have a python script test.py that contains: print("Hello") and I have a bash script test.sh that calls that python functio
I'm on a linux server and admin user. There're many admin users using this machine at the same time. So under current bash command line, how t
I have a scanning server I wrote in cgi/bash and want to be able to convert a bunch of images (all in one folder) to a pdf from the command li
I am having a really weird issue with git bash on windows. When I am working in Visual Studio I have no problem working with my git repo stored in a tfs server
I have a variable AAA which is in this format AAA='BBB=1 CCC=2 DDD=3' How can I use this to set environment variables BBB, CCC and DDD in a command I run (wi
I use the command wc -l count number of lines in my text files (also i want to sort everything through a pipe), like this: wc -l $directory-path/*.txt | sort -
Basically, I want to achieve something like the inverse of echo -e. I have a variable which stores a command output, but I want to print newlines as \n.
I am writing a bash script which has a json value stored in a variable now i want to extract the values in that json using Jq. The code used is. json_val={"co
I am facing a problem in writing a shell script for android devices to be run only on sh present in the device (/system/bin/sh). I have written the following s
I installed rvm (ruby version manager) and it was success, but I got WARNING: You have '~/.profile' file, you might want to load it, to do that add the fo
If I wanted to make a directory and change directory into it all in one line, I could do something like this: mkdir dir_name && cd $_ How can I do the
Why do I receive a syntax error for the following one-liner Python code? python -c 'import re; if True: print "HELLO";' File "<string>", line 1 impo
I'm writing a bash script and it throws an error when using "sh" command in Ubuntu (it seems it's not compatible with dash, I'm learning on this subject). So I
The MRE below should be enough to explain what I'm trying to do. Google doesn't help as it seems to be a unique error, which surprised me since Alpine & PyT