I have a bash script that needs the count of records/documents that exist for a given arango collection. This seemed easy enough, I used the following
which then runs the following script:
This appears to work, but when I
echo $records I get the correct value but it appears bolded. This leads to other reading issues so I redirected the
docker exec call to
cat -v and got the following output:
The #### is my record value and it is correct. How do I either properly print the value out of
arangosh or out of
docker exec? Or is the only path to strip these hidden ansi characters from my value?
I was able to attempt
docker exec -it arango arangosh and attempt the command
db._collection('my_collection').count() directly. This returned a bolded value which I believe means that it contains the hidden characters (
arangosh doesn't have
cat defined so I couldn't verify 100%).
With that said I believe the question is, can this be exported in plain text or do I need to
sed substitute these characters after my script receives the response?