User Tools

Site Tools



Q. I’m querying a Tarantool server from a Unix script for selecting a value from a space like this:

output=`echo “'key')[1][2]” | timeout 3s ./bin/tarantoolctl connect $URI 2>&1 | grep -v “localhost” | tr -d “-” | tr -d “.” | tr -d “ “` > /dev/null 2>&1

I did an extra grep and tr to remove the prints I don't need in the output, but the Tarantool server does prints anyway. Is there an easy way to fetch a value alone from the Tarantool server using a Unix script? (2016)

A. You could use socat or a shell script instead of tarantoolctl connect. socat is a command-line tool that can cat something into a Unix socket, but you're getting the same output as with tarantoolctl connect.


Enter your comment. Wiki syntax is allowed:
unix-scripting/output.txt · Last modified: 2018/06/04 19:41 by eabates

Real Time Web Analytics