I am new to Docker. I found that we can set environment variables using the ENV instruction in the Dockerfile. But how does one set Bash aliases for long comman
Hopefully someone can push me in the right direction. I have a Terraform plan that currently stands up a Linux VM in Azure. I am attempting to run a bash script
yesterday my laptop run out of battery it was late night and decided to not turn it on back. In the morning I ran into this issue Could you help me please. Can'
I am trying to build a C ELF binary on linux and try to execute it directly on another machine. (Sent via scp linux command) The problem is that even when I bui
I'm writing a script in Unix where I have to check whether the first character in a string is "/" and if it is, branch. For example, I have a string: /some/dire
What is a login shell and interactive shell, and what is a .bash_profile and .bashrc?
I have to create a shell program, such that each time certain users (given as parameters) connect/disconnect from the system, it will save in a text file if its
I'd like to put together a command that will print out a string of 32 hexadecimal digits. I've got a Python script that works: python -c 'import random ; print
When I tried to install python onto homebrew it downloaded it and then an error message popped up at the end that stopped it from completing. When I try to do i
I am writing a script which will be used to gather information on the available and used space on different partitions across servers. I need to be able to capt
I tried to install Ruby 2.0. My command line urped and now looks like the following: -bash: __git_ps1: command not found [11:58:28][whatever@whatever ~]$ I
❯ make --version GNU Make 3.81 ❯ bash --version GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin18) How can I pass a variable from inside
The following script yielded an unexpected output: printf "escaped slash: \\ \n" printf "2 escaped slashes: \\\\ \n" printf "3 escaped slashes: \\\\\\ \n" prin
I am trying to add a variable to the middle of a variable, so for instance in PHP I would do this: $mystring = $arg1 . '12' . $arg2 . 'endoffi
I would like a quick keyboard command sequence to copy the current command at a bash prompt to the clipboard. So that, for example, to copy the last bash comm
We all know arrays in Bash are indexed from zero, and in zsh are indexed from one. How can the script know it should use 0 or 1 if I can't ensure the running en
We all know arrays in Bash are indexed from zero, and in zsh are indexed from one. How can the script know it should use 0 or 1 if I can't ensure the running en
How can I convert a Windows dir path (say c:/libs/Qt-static) to the correct POSIX dir path (/c/libs/Qt-static) by means of standard msys features? And vice vers
I want to remove some n lines from the end of a file. Can this be done using sed? For example, to remove lines from 2 to 4, I can use $ sed '2,4d' file But
I am trying to output a string that contains everything between two words of a string: input: "Here is a String" output: "is a" Using: sed -n '/Here/,/