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.

How to urlencode data for curl command?

I am trying to write a bash script for testing that takes a parameter and sends it through curl to …

bash shell curl scripting urlencode
Retrieve CPU usage and memory usage of a single process on Linux?

I want to get the CPU and memory usage of a single process on Linux - I know the PID. …

linux shell memory-management cpu-usage
How to check the exit status using an if statement

I was wondering what would be the best way to check the exit status in an if statement in order …

bash shell if-statement error-handling
How to check if a file exists in a shell script

I'd like to write a shell script which checks if a certain file, archived_sensor_data.json, exists, and if …

shell
Check if pull needed in Git

How do I check whether the remote repository has changed and I need to pull? Now I use this simple …

git bash shell
`find -name` pattern that matches multiple patterns

I was trying to get a list of all python and html files in a directory with the command find …

shell find
What's a concise way to check that environment variables are set in a Unix shell script?

I've got a few Unix shell scripts where I need to check that certain environment variables are set before I …

bash unix shell
Expansion of variables inside single quotes in a command in Bash

I want to run a command from a bash script which has single quotes and some other commands inside the …

bash shell variables quotes
How to get a password from a shell script without echoing

I have a script that automates a process that needs access to a password protected system. The system is accessed …

bash shell scripting sh