Skip to content

Instantly share code, notes, and snippets.

@LuisPalacios
Created March 3, 2023 07:30
Show Gist options
  • Save LuisPalacios/d646638f7571d6e74c20502b3033cf07 to your computer and use it in GitHub Desktop.
Save LuisPalacios/d646638f7571d6e74c20502b3033cf07 to your computer and use it in GitHub Desktop.
Script que quita las lineas con comentarios, muy util como sustituto a `cat`
#!/bin/bash
# By LuisPa 1998
# confcat: quita las lineas con comentarios, muy util como sustituto
# a "cat" para ver contenido sin los comentarios.
#
grep -vh '^[[:space:]]*#' "$@" | grep -v '^//' | grep -v '^;' | grep -v '^$' | grep -v '^!' | grep -v '^--'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment