Some examples of calling bash functions in if; then; fi conditionals - both functions that echo and return.
#!/bin/bash -e
function functionOne {
echo -n "$1 - $2"
}| #!/bin/bash | |
| # query MySQL for slave replication status | |
| # note: requires [~/.my.cnf] to be present a populated with valid MySQL password | |
| mysql \ | |
| --batch \ | |
| --user root \ | |
| --execute "SHOW GLOBAL STATUS LIKE 'Slave_running';" | \ | |
| tail --lines 1 | grep --extended-regexp --quiet "^Slave_running\tON$" |
Have tested these instructions successfully under Ubuntu 16.04LTS and 14.04LTS.
Devices > CD/DVD 1 > Connect Image..../Applications/Parallels Desktop/Contents/Resources/Tools/prl-tools-lin.iso.transferDatabase():Reference: http://rtyley.github.io/bfg-repo-cleaner/
$ wget http://repo1.maven.org/maven2/com/madgag/bfg/1.11.8/bfg-1.11.8.jar
$ git clone git@github.com:org-name/repo-name.git repo-name.cleanup
$ java -jar bfg-1.11.8.jar --delete-files '*.{gif,jpg,png}' repo-name.cleanup
$ cd repo-name.cleanup
$ git gc --prune=now --aggressive| #!/bin/bash | |
| git clone --depth 1 \ | |
| -qb $BRANCH_NAME \ | |
| $REPOSITORY_URL $TARGET_CLONE_DIR | |
| cd $TARGET_CLONE_DIR | |
| git submodule update -q --init --depth 1 |
| #!/bin/bash | |
| find . -type f -exec touch -r "{}" -d '+1 day' "{}" \; |
Chrome (at least) likes to cache HTTP redirects, an issue if you are running logging/reporting on those redirect actions server side. Combat this with some HTTP headers.
Location: http://domain.com/redirect
Cache-Control: must-revalidate,no-cache,no-store
Expires: Sat, 01 Jan 2000 00:00:00 GMT
Or in PHP land that could be...