Execute the following script to delete last "n" lines from the "hostory" command in linux.
1. start=<no> ; line from which the deletion should start.
2. Count=<no> ; Number of lines to be delted.
3. Execute the below script,
while [ $count -ge 0 ] ; do history -d $start ; ((count --)) ; done
Done, It will be deleted
1. start=<no> ; line from which the deletion should start.
2. Count=<no> ; Number of lines to be delted.
3. Execute the below script,
while [ $count -ge 0 ] ; do history -d $start ; ((count --)) ; done
Done, It will be deleted