Getting started with 1Password for your growing team, or refining your setup? Our Secured Success quickstart guide is for you.
Forum Discussion
leonbooot
2 years agoNew Contributor
Feature request: basic filters for `op inject`
I've been having a go at injecting secrets into config files using the op inject CLI command, which is nice, but I'm already running into some problems. What I'm running in to right now is a way to...
mmorejon
2 years agoNew Contributor
A workaround is to create a script adding the space needed at the beginning of each line.
```
!/bin/sh
the script read line by line adding two spaces when the line doesn't start with the value:
- vault_: for variables
- -----BEGIN: for certificates
while IFS= read -r line
do
if [[ "$line" == "vault_"* ]] || [[ "$line" == " -----BEGIN"* ]]
then
echo "$line" >> tmp.yml
else
echo " $line" >> tmp.yml
fi
done < "$1"
replace current content with the new YAML file formatted
mv tmp.yml $1
```