Skip to content

Instantly share code, notes, and snippets.

View bartosik-hep's full-sized avatar

Nazar Bartosik bartosik-hep

View GitHub Profile
@bartosik-hep
bartosik-hep / Commands.md
Last active October 16, 2025 19:27
Useful commands and snippets

Mount remote SSH folder optimised for fast reading
sshfs -s -o direct_io,compression=no <source> <destination>

Open SSH tunnel (configured in ~/ssh/config)
ssh -CNYfq <host>

Insert multiline search results into a copy of another file for c in $(ls -1 --color=never chips/chip_NCPU82-25E2-*_*[0-9].json); do fin=$(l --color=never ../efuses/${c%%_2025*}*[0-9].json | head -n 1); ll $fin; fout=${c/chips/chips_merged}; echo "$fin -&gt; $fout"; head -n -2 $c &gt; $fout; grep -A 4 -B 1 "efuses" $fin &gt;&gt; $fout; tail -n 2 $c &gt;&gt; $fout; done