diff --git a/snippets/boinc.sh b/snippets/boinc.sh index dd231c9..0bdd267 100755 --- a/snippets/boinc.sh +++ b/snippets/boinc.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/usr/bin/env sh # sources: # - https://wiki.archlinux.org/?title=BOINC#Laptop_overheating_and_battery_duration_reduction diff --git a/snippets/check port is reachable.sh b/snippets/check port is reachable.sh index 2647f47..f1023e8 100644 --- a/snippets/check port is reachable.sh +++ b/snippets/check port is reachable.sh @@ -1,4 +1,4 @@ -#!sh +#!/usr/bin/env sh # Sources: # - https://superuser.com/questions/621870/test-if-a-port-on-a-remote-system-is-reachable-without-telnet diff --git a/snippets/diff.sh b/snippets/diff.sh index 220ca38..c644c5a 100644 --- a/snippets/diff.sh +++ b/snippets/diff.sh @@ -1,4 +1,4 @@ -#!sh +#!/usr/bin/env sh # Sources: # - https://stackoverflow.com/questions/8800578/how-to-colorize-diff-on-the-command-line diff --git a/snippets/filesystems.sh b/snippets/filesystems.sh index 0b00334..9be55c8 100644 --- a/snippets/filesystems.sh +++ b/snippets/filesystems.sh @@ -1,4 +1,4 @@ -#/usr/bin/env sh +#!/usr/bin/env sh # Get the *sector* size of partitions in 512-byte sectors sudo blockdev --getsz '/dev/nvme0n1p1' diff --git a/snippets/functions.sh b/snippets/functions.sh index 6d80252..b0520c5 100644 --- a/snippets/functions.sh +++ b/snippets/functions.sh @@ -1,4 +1,4 @@ -#!sh +#!/usr/bin/env sh is_strictly_false () { if [[ "$1" =~ '0|^[Ff][Aa][Ll][Ss][Ee]$|^[Nn][Oo]?$|^$' ]] diff --git a/snippets/sed.sh b/snippets/sed.sh index 1364173..9eddaf2 100644 --- a/snippets/sed.sh +++ b/snippets/sed.sh @@ -1,4 +1,4 @@ -#!sh +#!/usr/bin/env sh # Quote whatever is not a space. sed -E 's|([[:graph:]]+)|"\1"|g' diff --git a/snippets/ssh.sh b/snippets/ssh.sh index 1b1f811..b6539f2 100644 --- a/snippets/ssh.sh +++ b/snippets/ssh.sh @@ -1,3 +1,3 @@ #!/usr/bin/env sh -eval `ssh-agent` && ssh-add +eval $(ssh-agent) && ssh-add diff --git a/snippets/view files.sh b/snippets/view files.sh index 418ae90..0314840 100644 --- a/snippets/view files.sh +++ b/snippets/view files.sh @@ -1,4 +1,4 @@ -#!sh +#!/usr/bin/env sh # Just `vim` but read-only. view 'file'