≡ Menu

shell function

Linux: Set Environment Variable

Bash shell is used for various purposes under Linux. How do I customize the shell environment variable under Linux operating systems?
[click to continue…]

HowTo: Linux Random Password Generator Command

How do I generate random passwords on the Linux command line using the bash shell? How to create random password using Linux command line options?
[click to continue…]

Linux / UNIX: Generate Passwords

How do I generate random passwords under Linux / UNIX / Mac OS X and *BSD operating systems?
[click to continue…]

Linux / UNIX: Convert Hexadecimal to Decimal Number

How do I convert hex number to decimal number using a shell script under UNIX / Linux operating systems?
[click to continue…]

Bash Shell Script Function Examples

How do I create a shell script function using Bash under UNIX / Linux operating systems?
[click to continue…]

Alarm clock: How To Set Timeout For A Shell Command

Q. How can I run a command called foo, and have it timeout / abort after 10 seconds under GNU/Linux running bash shell or script? How do I run command under an alarm clock?
[click to continue…]

Pass Command Line Arguments To a Bash Alias Command

How do I pass all command line args to my bash alias called foo. For example:

alias foo="/path/to/command $@"

However $@ get interpreted when creating the alias instead of during the execution of the alias and escaping the $ doesn't work either. How do I solve this problem?
[click to continue…]