[NTLUG:Discuss] bash question
Paul Ingendorf
pauldy at wantek.net
Thu Sep 13 08:23:11 CDT 2001
or he could have just done
for file in *.pdf
do
mv "$file" "`echo $file | sed -e "s/ /\_/g"`"
done
but since I think he has it done I'm guessing it's wasted effort. I'm wondering is there a consistent file format for the information your looking to capture Mr. Wrenn. This part may be better handled prior to parsing the file to text.
-----Original Message-----
From: discuss-admin at ntlug.org [mailto:discuss-admin at ntlug.org]On Behalf
Of Kenneth Loafman
Sent: Thursday, September 13, 2001 7:57 AM
To: discuss at ntlug.org
Subject: Re: [NTLUG:Discuss] bash question
I don't do much bash, just Python, so here's a python solution that will
replace all spaces in filenames with '_' (underscore). I think you'll
find Python a lot easier to read and maintain.
...Ken
"Wrenn, Bobby J." wrote:
>
> If I can get an answer to this I will finally be able to use Linux at work.
>
> I need to take 209 pdf files with spaces in the file names. and convert them
> into text. I am very new to scripting and know nothing about regular
> expressions. Is there an easy way to remove the spaces from the file names?
> Then how do I recursively submit the files to pdftotext with the same name
> except for the .pdf changed to .txt?
>
> Just getting that much done will be a big help. The next step may be
> trickier. I need to extract a name, address, and equipment list from each of
> the files and get it into some kind of database where I can query for total
> by item or item by location.
>
> I'm a database beginner but a quick learner. TIA for any help. Please
> contact me directly if this is not appropriate for the list.
>
> TIA
> Bobby Wrenn
> Sr. Service Planner
> BancTec, Inc.
> 972.450.7832
>
> _______________________________________________
> http://www.ntlug.org/mailman/listinfo/discuss
More information about the Discuss
mailing list