Skip to content

Instantly share code, notes, and snippets.

View pstch's full-sized avatar
🔥
/dev/null

pistache pstch

🔥
/dev/null
View GitHub Profile
@pstch
pstch / stream-replace.sh
Last active July 18, 2023 11:35
Pipe a file to a process "in-place"
#!/usr/bin/env bash
# stream-replace.sh -- pipe a file to a process "in-place", using fallocate
#
# Copyright (C) 2020 Hugo Geoffroy "pistache" <[email protected]>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.