Search This Blog

Monday, March 28, 2011

vim find replace regex

Try to remove \n before the last "
Update:
"B160102","4-Nitropicolinaldehyde","108338-19-8
"
To:
"B160102","4-Nitropicolinaldehyde","108338-19-8"

:s%/-[0-9]\zs\n"\ze

\zs and \ze to set the start and end of a pattern.

mysql change root password

$ mysqladmin -u root password NEWPASSWORD

How to find the total number of files in a folder

root@209:/temp# ls /var/htdocs/temp | wc
19767 19767 212692