grep output to file

0

Greetings,

I am trying to write the output from aws s3 ls to a .csv file. I get a broken pipe error??

I tried the -f and --FILE==FILE options Any suggestions appreciated

aws s3 ls s3://summer-outputs/data/ --output text --human-readable --summarize --recursive | grep > ./files.csv

[Errno 32] Broken pipe
Exception ignored in: <_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>
BrokenPipeError: [Errno 32] Broken pipe
Clives
asked a year ago1940 views
1 Answer
1

The "| grep " does not look correct since you are not looking for any string before redirecting the output to file. Try:

aws s3 ls s3://summer-outputs/data/ --output text --human-readable --summarize --recursive > ./files.csv
profile picture
Syd
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions