Top "Shell" questions

The term 'shell' refers to a general class of text-based interactive command interpreters most often associated with the Unix & Linux operating systems.

Command not found error in Bash variable assignment

I have this script called test.sh: #!/bin/bash STR = "Hello World" echo $STR when I run sh test.sh …

bash shell syntax sh variable-assignment
how perform grep operation on all files in a directory

Working with xenserver, and I want to perform a command on each file that is in a directory, grepping some …

linux shell grep
Check if a file exists with wildcard in shell script

I'm trying to check if a file exists, but with a wildcard. Here is my example: if [ -f "xorg-x11-fonts*" ]; …

shell sh wildcard
How to get the second column from command output?

My command's output is something like: 1540 "A B" 6 "C" 119 "D" The first column is always a number, followed by a …

shell awk ksh
How to 'grep' a continuous stream?

Is that possible to use grep on a continuous stream? What I mean is sort of a tail -f <…

linux bash shell grep tail
bash/fish command to print absolute path to a file

Question: is there a simple sh/bash/zsh/fish/... command to print the absolute path of whichever file I feed …

bash shell path
How to assign name for a screen?

I'm using the screen multiplexer tool on the command shell and open a lot of screens. I then forget which …

linux unix shell gnu-screen
Is there a TRY CATCH command in Bash

I'm writing a shell script and need to check that a terminal app has been installed. I want to use …

bash shell error-handling
Shell Script Syntax Error: Unexpected End of File

In the following script I get an error: syntax error: unexpected end of file What is this error how can …

shell sh
Clear screen in shell

Just a quick question: How do you clear the screen in shell? I've seen ways like: import os os.system(…

python shell screen