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.

Listing only directories in UNIX

I want to list only the directories in specified path (ls doesn't have such option). Also, can this be done …

unix shell
How to run a command in the background and get no output?

I wrote two shell scripts a.sh and b.sh. In a.sh and b.sh I have a infinite …

shell
How to execute a MySQL command from a shell script?

How can I execute an SQL command through a shell script so that I can make it automated? I want …

mysql shell ssh
Generating a SHA-256 hash from the Linux command line

I know the string "foobar" generates the SHA-256 hash c3ab8ff13720e8ad9047dd39466b3c8974e592c2fa383…

linux shell sha256
How to create a cron job using Bash automatically without the interactive editor?

Does crontab have an argument for creating cron jobs without using the editor (crontab -e). If so, What would be …

bash shell cron
How to check if an environment variable exists and get its value?

I am writing a shell script. In this shell script, I am have a variable that either takes a default …

bash shell
How to assign the output of a Bash command to a variable?

I have a problem putting the content of pwd command into a shell variable that I'll use later. Here is …

bash shell
Highlight Bash/shell code in Markdown files

How can I highlight the Bash/shell commands in Markdown files? For example, to highlight js, I write: ```js function () { …

bash shell markdown github-flavored-markdown
What are the uses of the exec command in shell scripts?

Can anyone explain what are the uses of the exec command in shell scripting with simple examples?

shell unix exec
Concatenating multiple text files into a single file in Bash

What is the quickest and most pragmatic way to combine all *.txt file in a directory into one large text …

bash shell