[LUGSB] David: I need some help on using xargs command

Vacheh David Sardarian vsardari at ic.sunysb.edu
Tue Nov 16 23:47:33 EST 2010


Hi Everyone,

I'm stuck and I was wondering if there's anyone that could help me? Here 
is the problem.... I have 35 to 50 files in each folder that I have to 
process using the python script that I wrote. The python script when 
executes... it asks for a file name to be entered. For example, name.txt 
and it takes the file "name.txt" and it does something with it and it 
outputs name_size.txt. The thing is that I have around 35-50 .txt 
files... and i don't feel like copy and pasting 35-50 times every time I 
execute my python script. So I heard that there is a xargs command that 
can be used to pipe a list of file to xargs so that it runs the command 
on each file... but I have no idea how to do this... the more I search 
on Google the more confused I get... and its hard for me to understand 
the man pages...

I was wondering if John or anyone in the mailing list can give me a hand 
to solve the problem that I'm facing right now.

Thank you,
David.


More information about the lugsb mailing list