javascript - How to iterate through a file in java-script Luci OpenWRT? -


i want print file data in html table . don't know method correct way in java script luci openwrt .

here file :

/etc/myfile.sh  #!/bin/sh iptables -t nat -a prerouting -p tcp -m tcp --dport 666 -j dnat --to-destination 192.168.19.55 iptables -t nat -a prerouting -p tcp -m tcp --dport 633 -j dnat --to-destination 192.168.19.44 iptables -t nat -a prerouting -p tcp -m tcp --dport 656 -j dnat --to-destination 192.168.19.88 

i want show dport , to-destination values in html table .

for example output in html table :

port  ip  666   192.168.19.55 633   192.168.19.44 656   192.168.19.88 

but don't know how iterate file end of file (eof) in openwrt luci . can pure java script in openwrt ?

i went through nixio.fs.readfile in luci , don't know how line line contents of file .

otherwise can shell script ? or can xmlhttprequest() function in java script ? suggestions ? sample code ?


Comments

Popular posts from this blog

html - How to custom Bootstrap grid height? -

javascript - pass values from mssql to views in node -

image - python get coordinates (pixels) of corresponding points from clicks -