Question: I wrote the following script to find my dynamic public IP address and save how often it is changes

```
#!/usr/bin/env bash
ip=0
change=0
for ((count = 10000; count != 0, change == 10; count--)); do

    fetch="$(dig +short myip.opendns.com @resolver1.opendns.com)"
    dig +short myip.opendns.com @resolver1.opendns.com >>/home/nik/Desktop/file.txt
    if [ $ip == 0 ]; then
        ip=fetch
    elif [ $ip != "$fetch" ]; then
        change++
        echo $ip 
        echo " changed to "
        echo "$fetch"
        echo " at "
        echo date
    else
        echo ""
    fi
    echo "123"
    sleep 13
    (( count--))
done

```

I saved file as script.sh and changed it's executable permissions using

```
chmod +x script.sh

```

When I independently run dig command(in next line) or echo command directly in terminal, they log output to file without any problem

```
 dig +short myip.opendns.com @resolver1.opendns.com>>/home/nik/Desktop/file.txt

```

but when I run the script, It shows no output nor does it log anything into text file.
I use Ubuntu 19.10 if it matters.
Edit: added shebang and changed wait to sleep

Answer: 
That's not the syntax to display data in ejs ,try this.See these [docs](https://ejs.co/)

> 
> <%= Outputs the value into the template (HTML escaped)
> 
> 
> 

```
    <% for(var x=0;x<user.posts.length;x++) { %>
<div class="jumbotron">
    <div>by
        <b><%= user.posts[x].author %></b>
        on
        <small><%= user.posts[x].createdAt %></small>
    </div>

    <div>
        <p><%= user.posts[x].caption %></p>
    </div>

    <div class="row">
        <button onclick="actOnPost(event);"
                data-post-id="<%= this.id %>">Like
        </button>
        <span id="likes-count-<%= this.id %>"><%= this.likes_count %></span>
    </div>
</div>
<% } %>

```
Hi @odegeek what show us so far is how are you getting the data from the database and an idea of how to show it in your view. But we are missing a few pieces of information here. For example:

* Which frontend framework are you using if any?
* Where are you calling the backend endpoint?
* Which view engine are you using?

A typical flow for this scenario would be:

* You frontend makes a request to your backend asking for the data
* Once the response gets to the browser you do some kind of parsing/mapping to adapt it to your needs
* Then you pass it to your view for rendering. Now depending on the frontend framework/view engine you are using. The code to render the data will vary

I hope this can give you a idea of what you need to provide/do .. thanks