kubectl get nodes > all_nodes.txt
cat all_nodes.txt | while read line ; do if [[ $line == *"sobusy"* ]]; then echo $line; fi; done > filtered_nodes.txt
kubectl logs <pod> <search_criteria> > some_file.txt
kubectl get nodes > all_nodes.txt
cat all_nodes.txt | while read line ; do if [[ $line == *"sobusy"* ]]; then echo $line; fi; done > filtered_nodes.txt
kubectl logs <pod> <search_criteria> > some_file.txt
| #!/bin/bash | |
| ################ | |
| # Uncomment if you want the script to always use the scripts | |
| # directory as the folder to look through | |
| #REPOSITORIES="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
| REPOSITORIES=`pwd` | |
| IFS=$'\n' |
| # Credit http://stackoverflow.com/a/2514279 | |
| for branch in `git branch -r | grep -v HEAD`;do echo -e `git show --format="%ci %cr" $branch | head -n 1` \\t$branch; done | sort -r |
| /* | |
| 1. Whats the difference between a local and a global variable. Implement a bug that could be | |
| caused by accidentally forgetting to var a local variable | |
| */ | |
| /** | |
| A global variable is found in the global scope, eg. the window object, and can | |
| be accessed from any other scope. | |
| A local variable is contained within the scope of a function and can only be |
| @Grab(group="org.twitter4j", module="twitter4j-core", version="4.0.2") | |
| import twitter4j.* | |
| import twitter4j.api.* | |
| import twitter4j.conf.* | |
| import org.pentaho.reporting.engine.classic.core.util.TypedTableModel; | |
| colNames = ['Screen Name', 'Tweet Date', 'Text'] as String[] | |
| colTypes = [String, Date, String] as Class[] | |
| model = new TypedTableModel(colNames, colTypes); |
| ############################################################ | |
| # Dockerfile to build Pentaho EE BA Server container images | |
| # Based on Ubuntu 14.04 | |
| ############################################################ | |
| FROM ubuntu:14.04 | |
| MAINTAINER Matt Tucker, [email protected] | |
| ## Install Base Software | |
| RUN apt-get update -y |