I would like to retrieve the name of the latest snapshot file using a command line sensor (to later use that in a cURL call using the restful component).
To do that, I have the following
- platform: command_line
name: Latest Snapshot Filename
command: 'ls -t /backup/ | head -n1'
However it does not give me anything. Can anyone help me out?