How to reload .bash_profile from the command line??
How can I reload .bash_profile from the command line? I can get the shell to recognize changes to .bash_prof...
PHP Command, not found?
I tried to install composer via PHP command like said in getcomposer site, But the bash throw an error: bash: php:...
Echo tab characters in bash script?
How do I echo one or more tab characters using a bash script? When I run this code res=' 'x # res = "\t\tx" e...
psql: command not found Mac?
I installed PostgreSQL via the graphical install on http://www.postgresql.org/download/macosx/ I see it in my appli...
How to cd into a directory with space in the name??
I'm attempting to get into the directory /cygdrive/c/Users/my dir/Documents: $ DOCS="/cygdrive/c/Users/my\ dir/Docu...
How to convert a string to lower case in Bash??
Is there a way in bash to convert a string into a lower case string? For example, if I have: a="Hi all" I want t...
Reading a delimited string into an array in Bash?
I have a variable which contains a space-delimited string: line="1 1.50 string" I want to split that string with ...
Optional option argument with getopts?
while getopts "hd:R:" arg; do case $arg in h) echo "usgae" ;; d) dir=$OPTARG ;; ...
How to perform bitwise operations on hexadecimal numbers in bash??
In my bash script I have a string containing a hexadecimal number, e.g. hex="0x12345678". Is it possible to treat it...
How to copy directories into a directory using install in bash??
Assume the nested directories foo/bar and a empty directory dest. I would like to call something like install foo de...
getting a previous date in bash/unix?
I am looking to get previous date in unix / shell script . I am using the following code date -d ’1 day ago’ +...
How to echo shell commands as they are executed?
In a shell script, how do I echo all shell commands called and expand any variable names? For example, given the fo...
Simulate user input in bash script [closed]?
Closed. Th...
gzip: stdin: not in gzip format tar: Child returned status 1 tar: Error is not recoverable: exiting now?
I have a bash script that creates a tar.gz and encrypts then sends to drive. However I cannot open the .tar.gz afte...