1
  1. I'm kinda new to writing batches and i'm trying to write one that connects to redis server in localhost, execute some commands and put the result in stdout (I need to analyze this result in other tool).

I've started with a simple PING command. Here is the batch content:

redis-cli -h localhost -p 6379 PING>&1

I'm getting this error:

The handle could not be duplicated
during redirection of handle 1.
  1. What should I do in case I have multiple commands like: redis-cli -h localhost -p 6379 PING redis-cli -h localhost -p 6379 KEYS *? Should I have to execute them separately ?

  2. Is getting result from redis-cli is fine ? Or it's better to use PowerShell for this cases ? https://powerredis.codeplex.com/

ohadinho
  • 5,866
  • 14
  • 61
  • 111

0 Answers0