Following may help here.
awk -v line=3 'FNR==line{next} 1' Input_file
Explanation:
-v line=3
: Means creating awk
variable named line whose value is 3 here as per your post.
FNR==line
: Checking condition here if line number(awk's out of the box variable) value is equal to variable line value.
{next}
: If condition mentioned above is TRUE then putting next will skip all further statements and nothing will happen on 3rd line of Input_file.
1
: awk
works on method of condition and action so by mentioning 1
making condition as TRUE and not mentioning any action so by default print of line will happen.
In case you want to save output into same Input_file itself then append > temp_file && mv temp_file Input_file
to above code too.
Or with sed
in case -i
option is not there.
sed '3d' Input_file > temp_file && mv temp_file Input_file
POSIX sed
page:
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/sed.html