Pages
(Move to ...)
Home
Java
Android
Php
Cake PHP
jQuery
Grails
All Pages
▼
Showing posts with label
bash
.
Show all posts
Showing posts with label
bash
.
Show all posts
Friday, November 11, 2016
Untrack files from git using git bash
›
This will start ignoring the changes to the file: git update-index --assume-unchanged path/to/file When you want to start keeping track...
Sunday, August 25, 2013
HowTo Format Date For Display or Use In a Shell Script
›
H ow do I format date to display on screen on for my shell scripts as per my requirements on Linux or Unix like operating systems You need ...
Call and store response from a url using bash script
›
#!/bin/bash ## generate random string of length 18 function randpass { echo `</dev/urandom tr -dc A-Za-z0-9 | head -c18` } ...
Wednesday, June 19, 2013
bash split string into array
›
IFS = ', ' read - a array <<< "$string" /* array is the variable name */ To access an individual element: ...
How to set a BASH variable equal to the output from a command?
›
In addition to the backticks, you can use $() , which I find easier to read, and allows for nesting. OUTPUT = $ ( ls - 1 ) echo $OUTPU...
Sunday, February 24, 2013
How to tell if a string is not defined in a bash shell script
›
#!/bin/bash if [ -z $1 ]; then echo 'Enter something please.'; exit 1; fi;
Tuesday, December 11, 2012
Check if a program exists from a bash script
›
$ command - v foo > /dev/ null 2 >& 1 || { echo >& 2 "I require foo but it's not installed. Aborting....
›
Home
View web version