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.




1935 posts

Uber Geek

Lifetime subscriber

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

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.





Life is too short to remove USB safely.


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

Uber Geek

Trusted
Subscriber

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

sudo apt install vi

 

 

 

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





CPU: Intel 3770k| RAM: F3-2400C10D-16GTX G.Skill Trident X |MB:  Gigabyte Z77X-UD5H-WB | GFX: GV-N660OC-2GD gv-n660oc-2gd GeForce GTX 660 | Monitor: Qnix 27" 2560x1440

 

 




1935 posts

Uber Geek

Lifetime subscriber

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

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?

 

 





Life is too short to remove USB safely.


 
 
 
 


96 posts

Master Geek

Subscriber

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

control shift v




1935 posts

Uber Geek

Lifetime subscriber

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

OMG it matters which * key you use!

 

 





Life is too short to remove USB safely.




1935 posts

Uber Geek

Lifetime subscriber

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

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

 

 





Life is too short to remove USB safely.


424 posts

Ultimate Geek

Subscriber

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

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?




1935 posts

Uber Geek

Lifetime subscriber

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

@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????

 

 





Life is too short to remove USB safely.


 
 
 
 




1935 posts

Uber Geek

Lifetime subscriber

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

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.





Life is too short to remove USB safely.


424 posts

Ultimate Geek

Subscriber

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

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.


3826 posts

Uber Geek

Lifetime subscriber

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

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.



1935 posts

Uber Geek

Lifetime subscriber

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

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.





Life is too short to remove USB safely.




1935 posts

Uber Geek

Lifetime subscriber

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

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





Life is too short to remove USB safely.


mdf

2622 posts

Uber Geek

Trusted
Subscriber

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

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.

 

 


153 posts

Master Geek

Lifetime subscriber

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

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

2622 posts

Uber Geek

Trusted
Subscriber

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

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 »

Freeview On Demand app launches on Sony Android TVs
Posted 6-Aug-2020 13:35


UFB hits more than one million connections
Posted 6-Aug-2020 09:42


D-Link A/NZ extends COVR Wi-Fi EasyMesh System series with new three-pack
Posted 4-Aug-2020 15:01


New Zealand software Rfider tracks coffee from Colombia all the way to New Zealand businesses
Posted 3-Aug-2020 10:35


Logitech G launches Pro X Wireless gaming headset
Posted 3-Aug-2020 10:21


Sony Alpha 7S III provides supreme imaging performance
Posted 3-Aug-2020 10:11


Sony introduces first CFexpress Type A memory card
Posted 3-Aug-2020 10:05


Marsello acquires Goody consolidating online and in-store marketing position
Posted 30-Jul-2020 16:26


Fonterra first major customer for Microsoft's New Zealand datacentre
Posted 30-Jul-2020 08:07


Everything we learnt at the IBM Cloud Forum 2020
Posted 29-Jul-2020 14:45


Dropbox launches native HelloSign workflow and data residency in Australia
Posted 29-Jul-2020 12:48


Spark launches 5G in Palmerston North
Posted 29-Jul-2020 09:50


Lenovo brings speed and smarter features to new 5G mobile gaming phone
Posted 28-Jul-2020 22:00


Withings raises $60 million to enable bridge between patients and healthcare
Posted 28-Jul-2020 21:51


QNAP integrates Catalyst Cloud Object Storage into Hybrid Backup solution
Posted 28-Jul-2020 21:40



Geekzone Live »

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


Support Geekzone »

Our community of supporters help make Geekzone possible. Click the button below to join them.

Support Geezone on PressPatron



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.

Alternatively, you can receive a daily email with Geekzone updates.