Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ### tzch.sh - v0.1
- ### A script for changing the timezone.
- ###
- ### Last update: 17/12/2019
- #!/bin/bash
- ARGS=${@}
- TIMEZONE=$(timedatectl list-timezones | grep -m 1 ${ARGS// /_})
- if [[ "$TIMEZONE" ]]; then
- $(sudo timedatectl set-timezone $TIMEZONE)
- echo "Time zone has change to: $TIMEZONE"
- else
- echo "Time zone not found"
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement