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
posta un anno fa1975 visualizzazioni
1 Risposta
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
con risposta un anno fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande