scripts

Various scripts for UNIX-like systems
git clone https://git.tronto.net/scripts
Download | Log | Files | Refs | README

commit f2e67113587cba859449cbb6c95fc57424157837
parent 46991f6b5f567aea1990fb2d138e0b31d3dec423
Author: Sebastiano Tronto <sebastiano@tronto.net>
Date:   Sun, 12 Jun 2022 18:46:27 +0200

Added cth

Diffstat:
MMakefile | 1+
Acth | 8++++++++
2 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/Makefile b/Makefile @@ -6,6 +6,7 @@ SCRIPTS = addressgrep \ brightness \ clip \ config-backup \ + cth \ dmenu-bookmarks \ dmenu-dwm-sessionmanager \ dmenu-filepicker \ diff --git a/cth b/cth @@ -0,0 +1,8 @@ +#!/bin/sh + +# Print a function or struct defintion from a C file +# see https://sebastiano.tronto.net/blog/2022-06-12-shell-ide-sed + +name=$1 +shift +sed -n "/^$name/,/^}/ p" $@