Luci does not accept the sed command

I am trying to remove the last char of the last line of a file using the

sed '$ s/.$//' tmp

')' expected near '$'

local sys = require("luci.sys")'sed '$ s/.$//' /var/log/message > /var/log/tmp')

Another issue that i had been facing if echo of" ( Double qoutes)'echo " " ' )'echo \" \" ')

None of the above would print a double qoute ( ")

Am i missing something?

Unbalanced quotes."sed '$ s/.$//' /var/log/message > /var/log/tmp")

The entire command sequence is passed to sh -c so you need to double quote:'echo "\\""')
1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.