Re: getting output from a command into a list to work with

2007-05-21 Thread Peter Otten
Anthony Irwin wrote: > I would like to run the command below and have each line from the > output stored as an element in a list. > > find /some/path/ -maxdepth 1 -type f -size +10k -exec ls -1 '{}' \ > > The reason for this is so I can then work on each file in the > following manner > > v

getting output from a command into a list to work with

2007-05-20 Thread Anthony Irwin
Hi All, I would like to run the command below and have each line from the output stored as an element in a list. find /some/path/ -maxdepth 1 -type f -size +10k -exec ls -1 '{}' \ The reason for this is so I can then work on each file in the following manner var = command for i in var: