I have created a function to search all double lines in a file.
I use the "line-number"g/.*/d to delete the line.
However I would like to confirm if a line has to be deleted or not, like the s/..//gc command
Is it possible to delete a certain line with the global or substitute
command and confirm every action?
When you delete the LINE app from your smartphone or PC, the chat history on the device will be deleted. However, even ... LINE is a tool to communicate with family and friends. To allow other users to recognize who you are on LINE, the name you have set, your profile picture and status message will be visible to them.
Use Window confirm() method in the client-side to confirm delete before delete in JavaScript. When you want to verify the user or delete something, it always a good idea to confirm the request before processing. The confirm() method show a dialog box with a message and two buttons (OK and Cancel).
By using the registry editor, the user can also enable the delete confirmation dialog box. Follow the below instructions. From the Start menu, open the Run dialog box or you can press the "Window + R" key to open the RUN window.
The first and simplest method to enable the confirm delete Windows 10 feature is to use the Recycle Bin properties option. To do so, follow the step-by-step guide below: Step 1. Right-click the Recycle Bin shortcut on your desktop and select Properties from the pop-up menu. Step 2.
Right-click on the Recycle Bin folder and click on the "Properties" option. "Recycle Bin Properties" window will appear on the screen. Click (select) on the "Display delete confirmation dialog" option and click on the "Apply" button to proceed. And, when you delete any file or folder then, the delete confirmation dialog will appear on the screen.
function confirmDelete () { var r=confirm ("Are you sure you want to delte this image"); if (r==true) { //User Pressed okay. Delete } else { //user pressed cancel. Do nothing } } <img src="deleteicon.png" onclick="confirmDelete ()"> You might want to pass some data with confirmDelete to determine which entry is to be deleted
If I wanted to delete lines in a file and confirm each one, I would:
dd
n
.
, else n
againWhy not try a substitute command instead of the delete command?
"line-number"s/^.*$\n//c
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With