Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

need single line output for CNAME records with awless list records #79

Closed
lakamsani opened this issue Mar 16, 2017 · 2 comments
Closed
Labels

Comments

@lakamsani
Copy link

lakamsani commented Mar 16, 2017

Hi,

For a CNAME record command like this awless records | grep CNAME, it is printing ttl on a second line like this. That makes it hard to write scripts that parse the output.

| awls-c6380b5c | CNAME | alias.domain.com. | real-host.amazonaws.com
| 60 |

If you could print them all one one line that would be great on your next update.

@fxaguessy
Copy link
Contributor

You should not use the default display format (table) to parse outputs in scripts. Tables are human readable and they may introduce line-breaks if entries are too long.
Use rather the csv (./awless list records --format csv) or tsv (./awless list records --format tsv) format that will be much easier to parse.

That being said, there was a bug in 0.0.19 in which ./awless list records --format csv/tsv also added new lines inside records (which broke CSV/TSV format). This is now fixed on master and will be in next release.

Thanks for the bug report.

@lakamsani
Copy link
Author

sounds good. thanks for making this handy tool available as open source.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants