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
已提问 1 年前1975 查看次数
1 回答
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
已回答 1 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则