Todos Nuevo

user:thomas gists creados por el usuario

title:mygist gists con el título indicado

description:sync gists with given description

filename:myfile.txt gists que contienen archivos con el nombre indicado

extension:yml gists que contienen archivos con la extensión indicada

language:go gists que contienen archivos con el lenguaje indicado

topic:homelab gists with given topic

all:systemctl search all fields

Registrarse

Iniciar sesión

Todos Nuevo Registrarse Iniciar sesión

Todos los gists

Recientemente creado
Menos reciente creado
Recientemente actualizado
Menos reciente actualizado
rootiest's Avatar

rootiest / bash-script-hygeine.md

0 gustos
0 bifurcaciones
1 archivos
Última actividad 1 day ago

Bash Scripting Basic Hygiene Checklist

Task Recommendation Why?
The Shebang #!/usr/bin/env bash Maximum portability across different Unix-like systems.
Error Handling set -euo pipefail Ensures the script stops at the first sign of trouble.
Quoting "$VARIABLE" Prevents word splitting and globbing (essential for paths).
Variable Style local_var="value" Lowercase prevents overwriting system-wide environment variables.
Boilerplate readonly CONSTANT Prevents accidental modification of fixed values.
Extensions .sh or none Helps with syntax highlighting and identifying file types.
rootiest's Avatar

rootiest / hello-world.cpp

0 gustos
0 bifurcaciones
1 archivos
Última actividad 1 day ago
1 #include <iostream>
2 #include <string>
3 using namespace std;
4
5 int main() {
6 string name;
7 cout << "\nWhat is your name (first and last)? ";
8 getline(cin, name);
9 cout << "\nHello, " << name << endl;
10 return 0;
Siguiente Anterior

Desarrollado por Opengist ⋅ Load: 65ms⋅

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