Deleting "user input line number" from a file using sed

view full story

http://www.unix.com – Hi 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 Thanks, Sudeep (HowTos)