All New

user:thomas gists created by user

title:mygist gists with given title

filename:myfile.txt gists having files with given name

extension:yml gists having files with given extension

language:go gists having files with given language

topic:homelab gists with given topic

Register

Login


All New Register Login

All gists matching topic windows

Recently created
Least recently created
Recently updated
Least recently updated
anthony's Avatar

anthony / Check OS in bash

0 likes
0 forks
1 files
Last active 1774264892
Handy bash-functions to detect current OS
bash linux macos shell windows
1 #!/usr/bin/env bash
2
3 isMac() {
4 uname -s | grep -q "Darwin"
5 }
6
7 isUbuntu() {
8 uname -s | grep -q "Linux"
9 }
Newer Older

Powered by Opengist ⋅ Load: 15ms⋅

日本語
Čeština Deutsch English Español Français Magyar Italiano 日本語 Polski Português Русский Türkçe Українська 中文 繁體中文