From 8ad6db49fd9f673fb36e3d5f3b1636c7cffed1b0 Mon Sep 17 00:00:00 2001 From: Morgan Date: Fri, 22 Nov 2019 23:43:55 +0100 Subject: [PATCH] fixes #3 codacy shell script issues --- active_hours.sh | 1 + count_commits.sh | 2 +- count_links.sh | 4 ++-- top_domains.sh | 4 ++-- top_extensions.sh | 4 ++-- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/active_hours.sh b/active_hours.sh index 3f1785a..66e9e8a 100755 --- a/active_hours.sh +++ b/active_hours.sh @@ -1,3 +1,4 @@ +#!/usr/bin/env bash git log --author="Morgan" \ --format="%ad" \ --date="format:%H" |\ diff --git a/count_commits.sh b/count_commits.sh index 685c0ac..cb3b615 100755 --- a/count_commits.sh +++ b/count_commits.sh @@ -1,2 +1,2 @@ -#/usr/bin/env bash +#!/usr/bin/env bash git rev-list HEAD --count diff --git a/count_links.sh b/count_links.sh index 2f7cc81..202d67c 100755 --- a/count_links.sh +++ b/count_links.sh @@ -1,3 +1,3 @@ -#/usr/bin/env bash +#!/usr/bin/env bash BASEDIR=$(dirname "$0") -cat "$BASEDIR/README.md" | cut -d'(' -f2 | cut -d')' -f1 | egrep "^http*" | sort -u | wc -l | tr -d ' ' +cut -d'(' -f2 "$BASEDIR/README.md" | cut -d')' -f1 | grep -E "^http*" | sort -u | wc -l | tr -d ' ' diff --git a/top_domains.sh b/top_domains.sh index 91ed15d..4d51539 100755 --- a/top_domains.sh +++ b/top_domains.sh @@ -1,3 +1,3 @@ -#/usr/bin/env bash +#!/usr/bin/env bash BASEDIR=$(dirname "$0") -cat "$BASEDIR/README.md" | cut -d'(' -f2 | cut -d')' -f1 | egrep "^http*" | awk -F/ '{print $3}' | sort | uniq -c | sort -n +cut -d'(' -f2 "$BASEDIR/README.md" | cut -d')' -f1 | grep -E "^http*" | awk -F/ '{print $3}' | sort | uniq -c | sort -n diff --git a/top_extensions.sh b/top_extensions.sh index d97c2c0..ca7df8c 100755 --- a/top_extensions.sh +++ b/top_extensions.sh @@ -1,3 +1,3 @@ -#/usr/bin/env bash +#!/usr/bin/env bash BASEDIR=$(dirname "$0") -cat "$BASEDIR/README.md" | cut -d'(' -f2 | cut -d')' -f1 | egrep "^http*" | awk -F/ '{print $3}' | sed -E -e 's_.*\.([^\.]+)$_\1_g' | sort | uniq -c | sort -n +cut -d'(' -f2 "$BASEDIR/README.md" | cut -d')' -f1 | grep -E "^http*" | awk -F/ '{print $3}' | sed -E -e "s_.*\.([^\.]+)\$_\1_g" | sort | uniq -c | sort -n