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年前1973ビュー
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年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ