0

Currently i have plan a process of using a script to add key values into redis using rpush.

I am currently using bin/sh to launch redis. But what is the syntax to rpush my keyvalue into redis server.

#!/bin/sh

redis-cli -h 172.16.114.54
rpush stlfile "fad.stl"         // how to rpush in with the correct syntax?

What kind of language is more suitable for redis so maybe i could change now to ease my future processes

Tsu Wei Quan
  • 335
  • 1
  • 5
  • 19

1 Answers1

0

Seems like using python would be easier to code Redis from this post i found here i can easily install python. ImportError: No module named redis

i managed to create a python script with this

import redis

r = redis.StrictRedis(host='172.16.114.54', port=6379, db=0)
r.lpush ('stlfile', 'variable.stl')
r.lrange ('stlfile', 0, -1)

when checked with another client i managed to see variable.stl went in :D

Community
  • 1
  • 1
Tsu Wei Quan
  • 335
  • 1
  • 5
  • 19