Working with Base64
Last updated
yq -p=base64 -oy '.' sample.txtWorks with UTF-16 😊
YSBzcGVjaWFsIHN0cmluZw==
yq -p=base64 -oy '.' sample.txta special string"a special string"yq -o=base64 '.' sample.ymlYSBzcGVjaWFsIHN0cmluZw==```
## Encode base64: string from document
Extract a string field and encode it to base64.
Given a sample.yml file of:
```yaml
coolData: "a special string"yq -o=base64 '.coolData' sample.ymlYSBzcGVjaWFsIHN0cmluZw==```