Hi
I am running the following command via the Exec node (against my Docker instance of NR), and would appreciate some help formatting the output
ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/ /' -e 's/-/|/'
Flow [Code]
[{"id":"903b1304.eb1308","type":"exec","z":"c8315ed2.dbcb38","command":"","addpay":true,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"Docker : Command Line","x":430,"y":1340,"wires":[["66ce0482.9205ac","525be8e6.3d3618","7d305c8.3af20a4"],["790c7035.376038"],["612bf1bf.e2bd48"]]},{"id":"66ce0482.9205ac","type":"debug","z":"c8315ed2.dbcb38","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":690,"y":1300,"wires":[]},{"id":"790c7035.376038","type":"debug","z":"c8315ed2.dbcb38","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":690,"y":1340,"wires":[]},{"id":"612bf1bf.e2bd48","type":"debug","z":"c8315ed2.dbcb38","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":690,"y":1380,"wires":[]},{"id":"d2d2f23e.fc40e","type":"inject","z":"c8315ed2.dbcb38","name":"","topic":"","payload":"pwd","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":190,"y":1260,"wires":[["903b1304.eb1308"]]},{"id":"a3b46341.ef0178","type":"inject","z":"c8315ed2.dbcb38","name":"","topic":"","payload":"ls","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":190,"y":1300,"wires":[["903b1304.eb1308"]]},{"id":"40ba6da0.b4fcdc","type":"inject","z":"c8315ed2.dbcb38","name":"","topic":"","payload":"ls -R | grep \":$\" | sed -e 's/:$//' -e 's/[^-][^\\/]*\\//--/g' -e 's/^/ /' -e 's/-/|/'","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":190,"y":1340,"wires":[["903b1304.eb1308"]]},{"id":"b6cc799f.3122c8","type":"inject","z":"c8315ed2.dbcb38","name":"","topic":"","payload":"find | sed 's|[^/]*/|- |g'","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":190,"y":1380,"wires":[["903b1304.eb1308"]]},{"id":"525be8e6.3d3618","type":"file","z":"c8315ed2.dbcb38","name":"","filename":"folder-file-paths.txt","appendNewline":true,"createDir":false,"overwriteFile":"true","encoding":"none","x":710,"y":1260,"wires":[["e64bcc18.c18af"]]},{"id":"e64bcc18.c18af","type":"debug","z":"c8315ed2.dbcb38","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":890,"y":1260,"wires":[]},{"id":"39eaa007.aa26d","type":"file in","z":"c8315ed2.dbcb38","name":"","filename":"folder-file-paths.txt","format":"utf8","chunk":false,"sendError":false,"encoding":"none","x":430,"y":1180,"wires":[["cd009d1a.20756","7d305c8.3af20a4"]]},{"id":"cd009d1a.20756","type":"debug","z":"c8315ed2.dbcb38","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":690,"y":1180,"wires":[]},{"id":"47c0f16a.0b6a9","type":"inject","z":"c8315ed2.dbcb38","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":180,"y":1180,"wires":[["39eaa007.aa26d"]]},{"id":"7d305c8.3af20a4","type":"ui_text","z":"c8315ed2.dbcb38","group":"53116eb2.9ab5f8","order":2,"width":0,"height":0,"name":"","label":"text","format":"{{msg.payload}}","layout":"row-spread","x":670,"y":1220,"wires":[]},{"id":"53116eb2.9ab5f8","type":"ui_group","z":"","name":"Services","tab":"1485ea90.d4e765","disp":true,"width":"15","collapse":true},{"id":"1485ea90.d4e765","type":"ui_tab","z":"","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]
Flow [Image]
The debug window looks to format the results just right, but there looks to be a charactor limit, so I sadly can't see everything that's returned.
So, in an attempt to get around this, I've tried the ui_text to see the contents via the dashboard (either via a file node or straight to it), but the formatting is all lost ?
Any solutions via existing nodes that people can share ?