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
gefragt vor einem Jahr1973 Aufrufe
1 Antwort
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
beantwortet vor einem Jahr

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen