• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 362
  • Last Modified:

Editing a CSV file automated.

I was wondering if I could edit this script to add a digit to the device number, the script I'm using to source fron the csv file created here will be looking for a device with a zero in fromt like 01, 02 and so on is there a quick commad I can run that will insert a zero in front of all device numbers?
0
atorex
Asked:
atorex
  • 3
1 Solution
 
mreith80Commented:
If you use VIM to edit the CSV file and simply want to insert a 0 at the start of each line?

You could:

Launch vim, vi file.csv and then hit : 'colon' and type %s/^/0/g and hit enter.
 
Hopefully this is what you were looking for?

Let me know, thanks!

Regards,

Michael

E-Mail: mreith@gmail.com
Blogsite: http://technobloggings.blogspot.com
Twitter:  http://www.twitter.com/therealmreith
YouTube: http://www.youtube.com/technoblob (work in progress, visit back for updates and our premiere!)
0
 
atorexAuthor Commented:
I was actualy looking to inser a zero at the start of the second CSV field, I have used ExCel to get this done but thanks for the vim option I'm sure I will use this in the future.
Thanks.
0
 
atorexAuthor Commented:
Used  a process with diferent software to complete
0
 
atorexAuthor Commented:
please close
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now