Eddie Fantastic
03-11-2005, 07:59 AM
Hi,
I'm new to this whole linux game. Look after a windows 2000 network. I've introduced a couple of linux servers onto the network to deal mainly with internet/email side of things.
My problem, we have a very old character based backend software system. At the end of each night it produces a csv file of delivery note data. Now, sometimes one of the columns within this file contains a "#" character when it ought to be numeric, this then has a knock on effect and delivery notes won't get printed until I go into this csv file and do a search and relpace on the "#" character and replace it with a space.
The csv file sits on a windows share, I've managed to mount this as a local drive on the linux box running centos3.3 using smbclient.
What i would ideally want to do is write a script that checks the /winshare dir for a file named daily.csv removes all instances of "#" within this file, then writes a new clean file called daily2.csv to the same dir and deletes the original daily.csv file.
I guess I would then have to add this to cron or something to have it check the dir every minute or so.
Any ideas would be helpful.
Thanks
I'm new to this whole linux game. Look after a windows 2000 network. I've introduced a couple of linux servers onto the network to deal mainly with internet/email side of things.
My problem, we have a very old character based backend software system. At the end of each night it produces a csv file of delivery note data. Now, sometimes one of the columns within this file contains a "#" character when it ought to be numeric, this then has a knock on effect and delivery notes won't get printed until I go into this csv file and do a search and relpace on the "#" character and replace it with a space.
The csv file sits on a windows share, I've managed to mount this as a local drive on the linux box running centos3.3 using smbclient.
What i would ideally want to do is write a script that checks the /winshare dir for a file named daily.csv removes all instances of "#" within this file, then writes a new clean file called daily2.csv to the same dir and deletes the original daily.csv file.
I guess I would then have to add this to cron or something to have it check the dir every minute or so.
Any ideas would be helpful.
Thanks