I'm trying to do the following:
output = run("ls -l backups")
for line in output.split("/n"):
do_stuff(line)
Any way of having the stdout
of ls
sent to output
?
To be more specific I'm using a CLI app called s3cmd
which does something similar to ls
, but with remote Amazon S3 buckets.
So a replacement for ls
won't help unfortunately.