Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.


kiwifidget

"Cookie"
3413 posts

Uber Geek

Lifetime subscriber

#272643 7-Jul-2020 17:07
Send private message

I am trying to follow the instructions as provided by DuckDNS for pi.

 

Its all come to grief on the 3rd command:

 

vi duck.sh

 

My pi responds with -bash: vi: command not found

 

 

 

Its a Rpi3B running the latest update 6.31.2

 

It looks like I have tried and failed at this before as the duckdns directory was already created, but I would like to try and get it done this time.

 

CLI is a totally foreign environment for me. Please be gentle.





Delete cookies?! Are you insane?!


View this topic in a long page with up to 500 replies per page Create new topic
 1 | 2
mentalinc
3225 posts

Uber Geek

Trusted

  #2518643 7-Jul-2020 17:10
Send private message

sudo apt install vi

 

 

 

or just use nano (easier for a beginner) to edit files.





CPU: AMD 5900x | RAM: GSKILL Trident Z Neo RGB F4-3600C16D-32GTZNC-32-GB | MB:  Asus X570-E | GFX: EVGA FTW3 Ultra RTX 3080Ti| Monitor: LG 27GL850-B 2560x1440

 

Quic: https://account.quic.nz/refer/473833 R473833EQKIBX 




kiwifidget

"Cookie"
3413 posts

Uber Geek

Lifetime subscriber

  #2518644 7-Jul-2020 17:11
Send private message

so I would type "nano duck.sh" instead?

 

OK, I did that and its given me something useful looking.

 

Now I have to copy text into that file, but Ctrl-V does not work.

 

I'm just going to type it in, probably faster.

 

GRR no idea if that worked.

 

Installing vi does not work, it says it cannot find the package.

 

Next command - crontab -e

 

Opens crontab in nano, ok.

 

Now I have type this line in at the bottom - */5 * * * * ~/duckdns/duck.sh >/dev/null 2>&1

 

But as soon as I type the first *,  it takes me to File Name to Write instead.

 

Surely this isnt supposed to be this hard?

 

 





Delete cookies?! Are you insane?!


danielparker
223 posts

Master Geek

Trusted
Lifetime subscriber

  #2518653 7-Jul-2020 17:32
Send private message

control shift v




kiwifidget

"Cookie"
3413 posts

Uber Geek

Lifetime subscriber

  #2518658 7-Jul-2020 17:46
Send private message

OMG it matters which * key you use!

 

 





Delete cookies?! Are you insane?!


kiwifidget

"Cookie"
3413 posts

Uber Geek

Lifetime subscriber

  #2518662 7-Jul-2020 17:52
Send private message

Last command tests if the script works

 

./duck.sh

 

 

 

I guess I went wrong somewhere:

 

./duck.sh: line 1: unexpected EOF while looking for matching ``'

 

./duck.sh: line 3: syntax error: unexpected end of file

 

 





Delete cookies?! Are you insane?!


huckster
842 posts

Ultimate Geek

ID Verified
Lifetime subscriber

  #2518666 7-Jul-2020 17:58
Send private message

That looks like you have pasted something into the file and you have a different quotation marks ` ' or "

 

How are you connected to the pi? Using a keyboard and screen? Using a client on a Windows box e.g. PuTTY?

 

When you setup the pi, which OS did you install? Lite version? Full version?


kiwifidget

"Cookie"
3413 posts

Uber Geek

Lifetime subscriber

  #2518672 7-Jul-2020 18:05
Send private message

@huckster

 

I couldnt get the paste to work (even ctrl shift v) so I typed it all in. 

 

I found I typed ` where I should have typed ~.

 

I am connected using Putty on Win10. The pi is running DietPi.

 

But anyway, I just tried ./duck.sh again and I dont get any errors, instead this

 

 % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100     2    0     2    0     0      2      0 --:--:-- --:--:-- --:--:--     2

 

Which sort of looks like its working????

 

 





Delete cookies?! Are you insane?!


 
 
 

Cloud spending continues to surge globally, but most organisations haven’t made the changes necessary to maximise the value and cost-efficiency benefits of their cloud investments. Download the whitepaper From Overspend to Advantage now.
kiwifidget

"Cookie"
3413 posts

Uber Geek

Lifetime subscriber

  #2518675 7-Jul-2020 18:11
Send private message

The instructions say I can check if its working by typing 

 

cat duck.log

 

And I should see OK or KO.

 

Instead it just goes to the prompt.





Delete cookies?! Are you insane?!


huckster
842 posts

Ultimate Geek

ID Verified
Lifetime subscriber

  #2518682 7-Jul-2020 18:23
Send private message

If you are connected using PuTTY, then copying and pasting into the file on the Pi is quite simple. Copy the line in Windows as you would normally, and when editing the file on the Pi (nano I presume), simply right-click in the PuTTY window.

 

vi is an editor but to install it, you need to run 

 

sudo apt-get install vim

 

The package is called vim. However, if you are not a command-line dude then using vi will only confuse things.

 

I suggest re-editing the duck.sh file and removing all that is there and trying again.

 

If you copy what you need and edit it first in something like Word on the PC, it can stuff up the quotation marks e.g. `Word is a pain' and that will confuse the Pi.


frankv
5680 posts

Uber Geek

Lifetime subscriber

  #2518687 7-Jul-2020 18:32
Send private message

kiwifidget:

The instructions say I can check if its working by typing 


cat duck.log


And I should see OK or KO.


Instead it just goes to the prompt.



cat is a command to display the contents of a file (like type in DOS or Windows), in this case duck.log. After displaying the file contents, it returns to the prompt, same as after any command. If it just goes to the prompt, it means that the file exists, but is empty.

kiwifidget

"Cookie"
3413 posts

Uber Geek

Lifetime subscriber

  #2518709 7-Jul-2020 18:44
Send private message

Thanks for all your help so far, but I think its not quite working yet.

 

As per instructions:

 

lets test the script

 

./duck.sh

 

this should simply return to a prompt

 

Instead of simply returning to the prompt I get that statisticky looking info.





Delete cookies?! Are you insane?!


kiwifidget

"Cookie"
3413 posts

Uber Geek

Lifetime subscriber

  #2518711 7-Jul-2020 18:45
Send private message

If the log file is empty would that imply the script isnt running?





Delete cookies?! Are you insane?!


mdf

mdf
3512 posts

Uber Geek

Trusted

  #2518718 7-Jul-2020 19:03
Send private message

nano duckdns.log

 

should just have "OK" in it if it is working properly.

 

I actually wrote a step-by-step guide for this here.

 

 


shanes
258 posts

Ultimate Geek

Lifetime subscriber

  #2518727 7-Jul-2020 19:33
Send private message

vi is horrible, nano is way better.

 

 

 

I tend to use WinSCP and then I have a explorer like file system to use what ever Windows editor I like.


mdf

mdf
3512 posts

Uber Geek

Trusted

  #2518730 7-Jul-2020 19:38
Send private message

shanes:

 

vi is horrible, nano is way better.

 

 

Oooh, them's fightin' words!

 

Though I do actually agree.


 1 | 2
View this topic in a long page with up to 500 replies per page Create new topic





News and reviews »

Air New Zealand Starts AI adoption with OpenAI
Posted 24-Jul-2025 16:00


eero Pro 7 Review
Posted 23-Jul-2025 12:07


BeeStation Plus Review
Posted 21-Jul-2025 14:21


eero Unveils New Wi-Fi 7 Products in New Zealand
Posted 21-Jul-2025 00:01


WiZ Introduces HDMI Sync Box and other Light Devices
Posted 20-Jul-2025 17:32


RedShield Enhances DDoS and Bot Attack Protection
Posted 20-Jul-2025 17:26


Seagate Ships 30TB Drives
Posted 17-Jul-2025 11:24


Oclean AirPump A10 Water Flosser Review
Posted 13-Jul-2025 11:05


Samsung Galaxy Z Fold7: Raising the Bar for Smartphones
Posted 10-Jul-2025 02:01


Samsung Galaxy Z Flip7 Brings New Edge-To-Edge FlexWindow
Posted 10-Jul-2025 02:01


Epson Launches New AM-C550Z WorkForce Enterprise printer
Posted 9-Jul-2025 18:22


Samsung Releases Smart Monitor M9
Posted 9-Jul-2025 17:46


Nearly Half of Older Kiwis Still Write their Passwords on Paper
Posted 9-Jul-2025 08:42


D-Link 4G+ Cat6 Wi-Fi 6 DWR-933M Mobile Hotspot Review
Posted 1-Jul-2025 11:34


Oppo A5 Series Launches With New Levels of Durability
Posted 30-Jun-2025 10:15









Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.