#!/bin/sh
awk -v value="$1" -v column="$2" '
$column == value {++removed; next}
1 {print}
END {print removed " lines removed" >"/dev/stderr"}
'
mv File.txt.tmp File.txt
Explanations:
* `-v value="$1"` sets the awk variable `value` to the shell script's first argument.
* For each line, if the condition `$column == value` is true, the code in the braces is executed.
* `$column` is the content of the column number `column` (starting at 1).
* `++removed` increments a counter of removed lines. The variable starts at 0.
* `next` skips to the next input line, so that the `print` instruction won't be executed when the condition is true.
* `1 {print}` prints every line that didn't cause the `next` directive to be executed. (`1` is an always-true condition.)
* `END {…}` executes the code inside the braces at the end of the input.
* The awk code writes to a temporary file which is then moved into place.