vim - need to write a script to change file format from dos to unix -


I have to create a script using VIM which opens the file, set the file format = Unix, and then save the file And exit. Could you please help? Thank you

First of all, check whether you have dos2unix or Dos2ux command; It does this for you already.

The name of the file should be done with

P> This is an in-line file format with : w command; Of course, you can call it -c "set ff = unix" .

Notes
  • can also be done separately. Different types of devices, such as sed , pearl , ...; Vim is quite a huge option.
  • It still starts a complete, interactive Vime Instance. See that additional command-line arguments can turn Vim into batch mode.

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -