I want to delete a line from a txt file for which the line number is user input. Say when user selects 19, the 19th line would be deleted from the file. Can anyone please provide me with a sed one liner for the same... I tried sed -i. The interaction would be like this
Enter the line to be deleted: 19
Record deleted from file.
I am facing problem in fixing user inpuit in a variable to sed -i
But the problem is that the file is very huge and xtra space consumption for a temp file is to be avoided even for creating any sort of swap in real time. Can it be done without making a temporary file