To check what the real type of and variable, run this command:
Object.prototype.toString.call(myVar)
It'll return something like [object Object]
. The second word is the real type of the variable.
Some examples:
To check what the real type of and variable, run this command:
Object.prototype.toString.call(myVar)
It'll return something like [object Object]
. The second word is the real type of the variable.
Some examples:
#!/bin/bash | |
echo 'Removing origins...' | |
git remote prune origin | |
BRANCHES=`git branch -vv | grep 'origin/.*: gone]' | awk '{print $1}'` | |
if [[ `echo -e "$BRANCHES" | wc -w` -gt 0 ]]; then | |
echo 'Removing branches:' | |
echo $BRANCHES |