Created
March 25, 2020 18:33
-
-
Save mak3r/8ebdfddaa3c2f891b2beb66cbaf33661 to your computer and use it in GitHub Desktop.
delete a single line of a file - super useful when ssh complains about re-issued keys in known_hosts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
file=$1 | |
line=$2 | |
sed -i.bak -e "$2d" "$1" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment