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 can I copy the output of a command directly into my clipboard?

How can I pipe the output of a command into my clipboard and paste it back when using a terminal? …

linux shell unix terminal clipboard
What is the proper way to test if a parameter is empty in a batch file?

I need to test if a variable is set or not. I've tried several techniques but they seem to fail …

windows shell batch-file cmd
How can I reverse the order of lines in a file?

I'd like to reverse the order of lines in a text file (or stdin), preserving the contents of each line. …

shell unix command-line
Assigning default values to shell variables with a single command in bash

I have a whole bunch of tests on variables in a bash (3.00) shell script where if the variable is not …

bash shell
How to add a progress bar to a shell script?

When scripting in bash or any other shell in *NIX, while running a command that will take more than a …

bash shell zsh
write a shell script to ssh to a remote machine and execute commands

I have two questions: There are multiple remote linux machines, and I need to write a shell script which will …

linux shell ssh
Returning value from called function in a shell script

I want to return the value from a function called in a shell script. Perhaps I am missing the syntax. …

shell return-value
Linux: copy and create destination dir if it does not exist

I want a command (or probably an option to cp) that creates the destination directory if it does not exist. …

linux bash shell unix cp
How can I suppress all output from a command using Bash?

I have a Bash script that runs a program with parameters. That program outputs some status (doing this, doing that...). …

bash shell scripting echo
Automate scp file transfer using a shell script

I have some n number of files in a directory on my unix system. Is there a way to write …

shell scp