Skip to content

Instantly share code, notes, and snippets.

@machinejade
machinejade / xrandr.sh
Created September 13, 2019 19:39 — forked from chirag64/xrandr.sh
#!/bin/bash
#If no argument is specified, ask for it and exit
if [[ -z "$@" ]];
then
echo "An argument is needed to run this script";
exit
else
arg="$@"
#Basic check to make sure argument number is valid. If not, display error and exit
if [[ $(($(echo $arg | grep -o "\s" | wc --chars) / 2 )) -ne 2 ]];
@machinejade
machinejade / xrandr.sh
Created September 13, 2019 19:39 — forked from chirag64/xrandr.sh
#!/bin/bash
#If no argument is specified, ask for it and exit
if [[ -z "$@" ]];
then
echo "An argument is needed to run this script";
exit
else
arg="$@"
#Basic check to make sure argument number is valid. If not, display error and exit
if [[ $(($(echo $arg | grep -o "\s" | wc --chars) / 2 )) -ne 2 ]];