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.

Chmod recursively

I have an archive, which is archived by someone else, and I want to automatically, after I download it, to …

linux shell find chmod
How to determine whether a given Linux is 32 bit or 64 bit?

When I type uname -a, it gives the following output. Linux mars 2.6.9-67.0.15.ELsmp #1 SMP Tue Apr 22 13:50:33 EDT 2008 i686 i686 …

linux shell 32bit-64bit processor
An example of how to use getopts in bash

I want to call myscript file in this way: $ ./myscript -s 45 -p any_string or $ ./myscript -h #should display help $ ./…

bash shell getopts
How to determine the current shell I'm working on

How can I determine the current shell I am working on? Would the output of the ps command alone be …

bash unix shell csh tcsh
Test if remote TCP port is open from a shell script

I'm looking for a quick and simple method for properly testing if a given TCP port is open on a …

shell tcp port solaris telnet
Bash tool to get nth line from a file

Is there a "canonical" way of doing that? I've been using head -n | tail -1 which does the trick, but …

bash shell unix awk sed
Running multiple commands in one line in shell

Say I have a file /templates/apple and I want to put it in two different places and then remove …

bash shell
Multi-line string with extra space (preserved indentation)

I want to write some pre-defined texts to a file with the following: text="this is line one\n this …

string bash shell echo
Difference between wait and sleep

What is difference between wait and sleep?

bash shell wait sleep
How to find encoding of a file via script on Linux?

I need to find the encoding of all files that are placed in a directory. Is there a way to …

file shell unix encoding