[TriLUG] Scripting & C++ question

Warren Myers volcimaster at gmail.com
Fri Nov 11 15:00:48 EST 2005


If you want to do it in C++, I have a sample program here that may help:
http://warrenmyers.com/code/C/grabline.cpp

However, bash just expands the * for you, so that *.txt gets expanded to:
fname1.txt fname2.txt etc on the command-line.

WMM

On 11/11/05, Mark Freeze <mfreeze at gmail.com> wrote:
>
> I need help in writing the following script:
> I have finished my file processing c++ program. (Many thanks to those of
> you who helped.) The program contains a for loop to process files listed
> as
> command line arguments. The program is working if I manually execute it as
> ./fileprog textfile1.txt textfile2.txt textfile3.txt, etc... What I want
> to
> do now is have cron run a script that will gather the names of the files
> in
> a particular directory and run the program. Can someone point me in the
> right direction or throw some examples my way?
> Thanks,
> Mark.
> --
> TriLUG mailing list : http://www.trilug.org/mailman/listinfo/trilug
> TriLUG Organizational FAQ : http://trilug.org/faq/
> TriLUG Member Services FAQ : http://members.trilug.org/services_faq/
>



--
http://warrenmyers.com
"God may not play dice with the universe, but something strange is going on
with the prime numbers." --Paul Erdős


More information about the TriLUG mailing list