I am faced with an issue that I have been attempting to remedy for some time and just can't find the best way to handle it.
I am not very well versed in Python, though I figured this may be a good project for me to start with (assuming it can't be done with basic UNIX/BASH)
Essentially I need to process received files through some scripting I have written. The issue lies in that I have several clients I run processing for that never send me the same punctuation in their files, if I receive 500 files per client and have to manually lower all file names before processing it can become very "data entry-ish" and consumes FAR to much of my time with this menial task.
So essentially my scripting points to a certain directory... for example:
dos2unix -n ~/untz/update/current/abc.prn ~/untz/update/current/abc.txt
The current directory is a symbolic link, pointing to the correct directory I am needing to work with.
The problem I am running into lies in that abc.prn is not always abc.prn, it could be Abc.prn one week, aBc.prn the next, abC.prn etc etc.
So all I really am trying to achieve is for the case of the .prn files to be ignored, and I have absolutely no idea how to go about this.
I am hoping someone more versed in this could lend a hand and point me in the right direction, as I said I know only basic Python/Perl.
So I guess to summarize:
1) Can this be done with just a unix/bash command?
If not..
2) Can someone point me at how I would go about incorporating this necessity into a python script? I know it can be done with Python or Perl, I am just not sure how.
This post has been edited by CapC: 31 May 2012 - 01:24 PM

New Topic/Question
Reply



MultiQuote





|