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>
<% } %>

```
The source code for the template is being rendered in the browser. This means that the view engine is not parsing it. 

The default view engine is Jade, but you aren't using Jade.

Probably you forgot to [configure the view engine](https://expressjs.com/en/guide/using-template-engines.html):

```
app.set('view engine', 'whatever template engine you are trying to use')

```