This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
COUNTER=/tmp/kernel_lines # zmienna odwolujaca sie do pliku w ktorym beda ilosci linii | |
if [[ ! -f $COUNTER ]]; then echo 0 > /tmp/kernel_lines; fi # jesli nie ma pliku z liniami to go stworz i upchnij tam 0 | |
NUM=`cat $COUNTER` # ogarnij ile linijek juz jest w pliku $COUNTER | |
LINES=`sed '/\/\*/,/*\//d' $1 | sed '/^\/\//d' | sed '/^$/d' | wc -l` # wypierdol komentarze z C | |
echo "$NUM + $LINES" # pokaz ze umiesz dodac to gowno | |
echo $((NUM+LINES)) > $COUNTER # zapisz to gowno |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11:25 $ sudo docker run terraform | |
TF_ACC= go test ./... -timeout=10s | |
ok github.com/hashicorp/terraform 0.005s | |
ok github.com/hashicorp/terraform/builtin/bins/provider-aws 0.004s | |
ok github.com/hashicorp/terraform/builtin/bins/provider-cloudflare 0.002s | |
? github.com/hashicorp/terraform/builtin/bins/provider-consul [no test files] | |
ok github.com/hashicorp/terraform/builtin/bins/provider-digitalocean 0.002s | |
ok github.com/hashicorp/terraform/builtin/bins/provider-dnsimple 0.002s | |
ok github.com/hashicorp/terraform/builtin/bins/provider-heroku 0.002s | |
ok github.com/hashicorp/terraform/builtin/bins/provisioner-file 0.002s |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define replace_matching_line($file, $match, $replace) { | |
exec { "/bin/sed ${file} -i.bak -e 's/${match}/${replace}/'": | |
onlyif => "/bin/grep -E '${match}' ${file}", | |
} | |
} |
NewerOlder