Commit a8d4e348bf
Unsigned
Layout: unified · split
ipatch +1
| @@ -1,4 +1,5 @@ | |||
| 1 | #!/bin/bash | 1 | #!/bin/bash |
| 2 | # Ilkay Alakay <ilkay@astronix.org>. Licensed under The Unlicense | ||
| 2 | [ $# -ne 3 ] && { echo "usage: ipatch <file> <line> <new line>"; exit 1; } | 3 | [ $# -ne 3 ] && { echo "usage: ipatch <file> <line> <new line>"; exit 1; } |
| 3 | f=$1 n=$2 new=$3 | 4 | f=$1 n=$2 new=$3 |
| 4 | [ -f "$f" ] || { echo "unable to find a file named $f"; exit 1; } | 5 | [ -f "$f" ] || { echo "unable to find a file named $f"; exit 1; } |