Using sed and grep to replace the first line of a file
export pattern="pattern"; \ for i in `grep -r -o -n "$pattern" . | grep ":1:=" | sed "s/\(.*\):1:$pattern/\1/g"`; \ do sed -i '1 s/^\(.*\)\(\s{10,}.*\)$/\1/g' "$i"; \ done;
by Justin Silver ·
export pattern="pattern"; \ for i in `grep -r -o -n "$pattern" . | grep ":1:=" | sed "s/\(.*\):1:$pattern/\1/g"`; \ do sed -i '1 s/^\(.*\)\(\s{10,}.*\)$/\1/g' "$i"; \ done;
NGINX Feature Flag Reverse Proxy
17 Jun, 2024
Slither & Echidna + Remappings
9 Jan, 2023
UnsafeMath for Solidity 0.8.0+
21 Jul, 2022
17 Feb, 2022
6 Feb, 2022
29 Apr, 2021
26 Apr, 2021
Autodesk Fusion 360 Using eGPU
2 Feb, 2021
25 Nov, 2020
Using APK for Alpine Linux with Docker
2 Dec, 2019
OSX Mojave Disappearing Icons Fixed
15 Oct, 2019
Rust: JSON stringify and parse in Node.js
6 Jun, 2019
1 Apr, 2019
28 Mar, 2019
Wildcard SSL Certs: Let’s Encrypt & Cloudflare
17 Sep, 2018
More