Hello Guest, if you are reading this it means you have not registered yet. Please take a second, Click here to register, and in a few simple steps you will be able to enjoy our community and use our OpenViX support section.
Page 2 of 4 FirstFirst 1234 LastLast
Results 16 to 30 of 48

Thread: Help needed please with cron timer

  1. #16
    birdman's Avatar
    Title
    Moderator
    Join Date
    Sep 2014
    Location
    Hitchin, UK
    Posts
    7,801
    Thanks
    237
    Thanked 1,659 Times in 1,307 Posts
    Quote Originally Posted by grantdavey91 View Post
    i am using a mac, and the program i am using is text wrangler ; if that helps
    It helps me (to know), but I doubt that it's helping you.
    In days gone by Mac systems used <CR> as and end of line marker, whereas all Unix/Linux system use <NL> (and MS Windows/DOS uses <CR><NL>). I'm assuming that this still obtains.
    Mind you, the BareBones version of TextWrangler claims that it "Transparently reads and writes DOS, Unix, and Mac files".

    i took out the \ but then i got the same error for line 50 :
    The "\" was meant to be there - but it is vital that there are no spaces following it. It must be the final character on the line.

    You haven't said what happened when you changed it to be all on one line.
    MiracleBox Prem Twin HD - 2@DVB-T2 + Xtrend et8000 - 5(incl. 2 different USBs)@DVB-T2[terrestrial - UK Freeview HD, Sandy Heath] - LAN/USB-stick/HDD

  2. #17
    grantdavey91's Avatar
    Title
    Forum Supporter
    Donated Member
    Join Date
    Feb 2015
    Location
    Essex UK
    Posts
    313
    Thanks
    115
    Thanked 290 Times in 111 Posts
    Quote Originally Posted by birdman View Post
    It helps me (to know), but I doubt that it's helping you.
    In days gone by Mac systems used <CR> as and end of line marker, whereas all Unix/Linux system use <NL> (and MS Windows/DOS uses <CR><NL>). I'm assuming that this still obtains.
    Mind you, the BareBones version of TextWrangler claims that it "Transparently reads and writes DOS, Unix, and Mac files".

    The "\" was meant to be there - but it is vital that there are no spaces following it. It must be the final character on the line.

    You haven't said what happened when you changed it to be all on one line.
    Thanks for the reply

    Apologies, when you said remove the '\' i assumed i didn't have to paste it back in after moving line 51 to line 50.

    I have amended to place the '\' back in the code, i then ran the command again and was presented with the same error for line 62 :

    Code:
    ./toppicks2.sh: line 62: syntax error: unexpected word (expecting "do")
    so i placed '\' at the end of line 62 which resolved this one

    I then ran the command again and I got :

    Code:
    ./toppicks2.sh: line 71: syntax error: unexpected word (expecting "done")
    line 71 on the script is literally 'done' wothout the quotation marks

    I added '\' thinking this would resolve, but i still got:

    Code:
    ./toppicks2.sh: line 71: syntax error: unexpected word (expecting "done")
    It's so very close now as it's only complaining about the last line

    any ideas?

    Thanks
    - Vu+ Duo 2 1 x DVB-S/S2 Twin Tuner, 1 x DVB-C/T/2 Twin Hybrid Tuner, 1TB Internal HDD; Vu+ Official Qwerty remote, w/ OpenVix 4.2 & Slyk1HD V5.1 Skin by kiddac
    - Technomate 97cm Mesh Satellite Dish with Octo 8 way LNB
    - Android 5.0.1 Lollipop Smart TV Box w/ Kodi v16.1 Jarvis custom flashed for EXMP fully loaded


    FULL Picon Sets for LCD Screens and GUI - SNP includes 28.2e Satellite, Virmin Cable, 13, 23 & 19 Sat & IPTV {click here}


  3. #18
    dsayers's Avatar
    Title
    ViX Beta Tester
    Join Date
    Mar 2016
    Posts
    1,767
    Thanks
    473
    Thanked 608 Times in 434 Posts
    Try and make it in line with the top line so

    Code:
        wget -q $url1$username$url2$link -O ${dest}/$name
        done
    I still haven't gòt round to playing with this but hopefully will tonight

  4. #19
    grantdavey91's Avatar
    Title
    Forum Supporter
    Donated Member
    Join Date
    Feb 2015
    Location
    Essex UK
    Posts
    313
    Thanks
    115
    Thanked 290 Times in 111 Posts
    Quote Originally Posted by dsayers View Post
    Try and make it in line with the top line so

    Code:
        wget -q $url1$username$url2$link -O ${dest}/$name
        done
    I still haven't gòt round to playing with this but hopefully will tonight
    thanks dsayer, just tried that, didn't work unfortunately
    - Vu+ Duo 2 1 x DVB-S/S2 Twin Tuner, 1 x DVB-C/T/2 Twin Hybrid Tuner, 1TB Internal HDD; Vu+ Official Qwerty remote, w/ OpenVix 4.2 & Slyk1HD V5.1 Skin by kiddac
    - Technomate 97cm Mesh Satellite Dish with Octo 8 way LNB
    - Android 5.0.1 Lollipop Smart TV Box w/ Kodi v16.1 Jarvis custom flashed for EXMP fully loaded


    FULL Picon Sets for LCD Screens and GUI - SNP includes 28.2e Satellite, Virmin Cable, 13, 23 & 19 Sat & IPTV {click here}


  5. #20
    birdman's Avatar
    Title
    Moderator
    Join Date
    Sep 2014
    Location
    Hitchin, UK
    Posts
    7,801
    Thanks
    237
    Thanked 1,659 Times in 1,307 Posts
    Quote Originally Posted by dsayers View Post
    Try and make it in line with the top line so
    This isn't python. It's a shell script and you can format it how you wish to enhance readability.
    MiracleBox Prem Twin HD - 2@DVB-T2 + Xtrend et8000 - 5(incl. 2 different USBs)@DVB-T2[terrestrial - UK Freeview HD, Sandy Heath] - LAN/USB-stick/HDD

  6. The Following User Says Thank You to birdman For This Useful Post:

    dsayers (17-09-16)

  7. #21
    grantdavey91's Avatar
    Title
    Forum Supporter
    Donated Member
    Join Date
    Feb 2015
    Location
    Essex UK
    Posts
    313
    Thanks
    115
    Thanked 290 Times in 111 Posts
    Quote Originally Posted by birdman View Post
    This isn't python. It's a shell script and you can format it how you wish to enhance readability.
    i'm giving everything i can think of a try but not succeeding at the moment, it is literally the very last line it's not happy with saying 'expecting done' but the last line says 'done' and doesn't have any trailing whitespace
    - Vu+ Duo 2 1 x DVB-S/S2 Twin Tuner, 1 x DVB-C/T/2 Twin Hybrid Tuner, 1TB Internal HDD; Vu+ Official Qwerty remote, w/ OpenVix 4.2 & Slyk1HD V5.1 Skin by kiddac
    - Technomate 97cm Mesh Satellite Dish with Octo 8 way LNB
    - Android 5.0.1 Lollipop Smart TV Box w/ Kodi v16.1 Jarvis custom flashed for EXMP fully loaded


    FULL Picon Sets for LCD Screens and GUI - SNP includes 28.2e Satellite, Virmin Cable, 13, 23 & 19 Sat & IPTV {click here}


  8. #22
    birdman's Avatar
    Title
    Moderator
    Join Date
    Sep 2014
    Location
    Hitchin, UK
    Posts
    7,801
    Thanks
    237
    Thanked 1,659 Times in 1,307 Posts
    Quote Originally Posted by grantdavey91 View Post
    Apologies, when you said remove the '\' i assumed i didn't have to paste it back in after moving line 51 to line 50.
    You shouldn't. But you didn't mention that you'd combined the lines into one.

    Code:
    ./toppicks2.sh: line 62: syntax error: unexpected word (expecting "do")
    so i placed '\' at the end of line 62 which resolved this one
    Removing an error message does not necessarily mean that you have resolved what was causing it. You've just combined that line with the next one and moved the reported problem elsewhere.

    All I can assume is that the fact that you are editing things on a Mac then transferring them onto the box is causing a text formatting problem in the script.
    That script runs fine for me on my box, and on my desktop and laptop, which run Linux Mint. It's just a simple shell script.

    If you tell me what workdir setting you wish to use I could post a version with that edited in, so you wouldn't need to edit at all and we could see how that gets on.
    Last edited by birdman; 17-09-16 at 21:02.
    MiracleBox Prem Twin HD - 2@DVB-T2 + Xtrend et8000 - 5(incl. 2 different USBs)@DVB-T2[terrestrial - UK Freeview HD, Sandy Heath] - LAN/USB-stick/HDD

  9. #23
    birdman's Avatar
    Title
    Moderator
    Join Date
    Sep 2014
    Location
    Hitchin, UK
    Posts
    7,801
    Thanks
    237
    Thanked 1,659 Times in 1,307 Posts
    Quote Originally Posted by grantdavey91 View Post
    i'm giving everything i can think of a try but not succeeding at the moment, it is literally the very last line it's not happy with saying 'expecting done' but the last line says 'done' and doesn't have any trailing whitespace
    It should have a trailing newline, though.
    I know that some editors think that this isn't needed....
    MiracleBox Prem Twin HD - 2@DVB-T2 + Xtrend et8000 - 5(incl. 2 different USBs)@DVB-T2[terrestrial - UK Freeview HD, Sandy Heath] - LAN/USB-stick/HDD

  10. #24
    grantdavey91's Avatar
    Title
    Forum Supporter
    Donated Member
    Join Date
    Feb 2015
    Location
    Essex UK
    Posts
    313
    Thanks
    115
    Thanked 290 Times in 111 Posts
    Quote Originally Posted by birdman View Post
    You shouldn't. But you didn't mention that you'd combined the lines into one.

    Removing an error message does not necessarily mean that you have resolved what was causing it. You've just combined that line with the next one and moved the reported problem elsewhere.

    All I can assume is that the fact that you are editing things on a Mac then transferring them onto the box is causing a text formatting problem in the script.
    That script runs fine for me on my box, and on my desktop and laptop, which run Linux Mint. It's just a simple shell script.

    If you tell me what workdir setting you wish to use I could post a version with that edited in, so you wouldn't need to edit at all and we could see how that gets on.
    sorry, i thought i had mentioned it ; apologies - my brain is just going to mush trying to get this to work

    well at first because many others had the same script and it was working for them i assumed it could be something to do with my box, and when i posted up the script i them thought after your reply that the script was wrong even though it was working for some, but i agree and you are more than likely right that its something to do with the editing on mac

    by workdir do you mean where the images will be saved? this will bee /usr/share/enigma2/slyk-1-hd/skyicons

    or where the script is going to be on the box /usr/script/toppicks2

    thanks birdman, really appreciate the help; apologies for my lack of knowledge at this point
    - Vu+ Duo 2 1 x DVB-S/S2 Twin Tuner, 1 x DVB-C/T/2 Twin Hybrid Tuner, 1TB Internal HDD; Vu+ Official Qwerty remote, w/ OpenVix 4.2 & Slyk1HD V5.1 Skin by kiddac
    - Technomate 97cm Mesh Satellite Dish with Octo 8 way LNB
    - Android 5.0.1 Lollipop Smart TV Box w/ Kodi v16.1 Jarvis custom flashed for EXMP fully loaded


    FULL Picon Sets for LCD Screens and GUI - SNP includes 28.2e Satellite, Virmin Cable, 13, 23 & 19 Sat & IPTV {click here}


  11. #25
    birdman's Avatar
    Title
    Moderator
    Join Date
    Sep 2014
    Location
    Hitchin, UK
    Posts
    7,801
    Thanks
    237
    Thanked 1,659 Times in 1,307 Posts
    Quote Originally Posted by grantdavey91 View Post
    by workdir do you mean where the images will be saved? this will bee /usr/share/enigma2/slyk-1-hd/skyicons

    or where the script is going to be on the box /usr/script/toppicks2
    The latter. i.e. the value for workdir in the script.

    This one should be all set up for you.

    toppicks2.sh.zip

    I suggest you copy the zip file into /usr/script/toppicks2 then run
    Code:
    unzip toppicks2.sh.zip
    to ensure that you have an exact copy of what I have...
    MiracleBox Prem Twin HD - 2@DVB-T2 + Xtrend et8000 - 5(incl. 2 different USBs)@DVB-T2[terrestrial - UK Freeview HD, Sandy Heath] - LAN/USB-stick/HDD

  12. The Following User Says Thank You to birdman For This Useful Post:

    grantdavey91 (17-09-16)

  13. #26
    ccs's Avatar
    Title
    ViX Beta Tester
    Join Date
    Sep 2014
    Posts
    5,836
    Thanks
    554
    Thanked 1,277 Times in 1,089 Posts
    ..... don't forget to cd /usr/script/toppicks2 before unzipping.

  14. #27
    grantdavey91's Avatar
    Title
    Forum Supporter
    Donated Member
    Join Date
    Feb 2015
    Location
    Essex UK
    Posts
    313
    Thanks
    115
    Thanked 290 Times in 111 Posts
    Quote Originally Posted by birdman View Post
    The latter. i.e. the value for workdir in the script.

    This one should be all set up for you.

    toppicks2.sh.zip

    I suggest you copy the zip file into /usr/script/toppicks2 then run
    Code:
    unzip toppicks2.sh.zip
    to ensure that you have an exact copy of what I have...
    LEGEND! IT WORKED!!

    Birdman, thank you so much for all your help; really appreciate it; I've asked all over the place and got help but no fix

    Now I can set up the cron to run it automatically and i'm not going to touch it

    but for future purposes for other scripts i may get involved in for the future, would you happen to know if there are any mac based apps/programs I will be able to edit shell on without having the same problem again? no worries if not

    thanks again Birdman, I bet it's a relief for you too, I can now stop pestering you haha!
    - Vu+ Duo 2 1 x DVB-S/S2 Twin Tuner, 1 x DVB-C/T/2 Twin Hybrid Tuner, 1TB Internal HDD; Vu+ Official Qwerty remote, w/ OpenVix 4.2 & Slyk1HD V5.1 Skin by kiddac
    - Technomate 97cm Mesh Satellite Dish with Octo 8 way LNB
    - Android 5.0.1 Lollipop Smart TV Box w/ Kodi v16.1 Jarvis custom flashed for EXMP fully loaded


    FULL Picon Sets for LCD Screens and GUI - SNP includes 28.2e Satellite, Virmin Cable, 13, 23 & 19 Sat & IPTV {click here}


  15. #28
    birdman's Avatar
    Title
    Moderator
    Join Date
    Sep 2014
    Location
    Hitchin, UK
    Posts
    7,801
    Thanks
    237
    Thanked 1,659 Times in 1,307 Posts
    Quote Originally Posted by grantdavey91 View Post
    but for future purposes for other scripts i may get involved in for the future, would you happen to know if there are any mac based apps/programs I will be able to edit shell on without having the same problem again? no worries if not
    The editor you are using claims to be able to handle Mac, Unix and DOS text files "automatically". Perhaps there is a "Save" option that lets you force the text format?
    But there is also the issue of how you then get the files onto the box - you haven't said how you do that.
    If you are using FTP then you could either write the file in Unix format then transfer it as a binary file, or write it in Mac format then transfer it as an ASCII/text one.
    MiracleBox Prem Twin HD - 2@DVB-T2 + Xtrend et8000 - 5(incl. 2 different USBs)@DVB-T2[terrestrial - UK Freeview HD, Sandy Heath] - LAN/USB-stick/HDD

  16. #29
    grantdavey91's Avatar
    Title
    Forum Supporter
    Donated Member
    Join Date
    Feb 2015
    Location
    Essex UK
    Posts
    313
    Thanks
    115
    Thanked 290 Times in 111 Posts
    Quote Originally Posted by birdman View Post
    The editor you are using claims to be able to handle Mac, Unix and DOS text files "automatically". Perhaps there is a "Save" option that lets you force the text format?
    But there is also the issue of how you then get the files onto the box - you haven't said how you do that.
    If you are using FTP then you could either write the file in Unix format then transfer it as a binary file, or write it in Mac format then transfer it as an ASCII/text one.
    I'll have a look to see if it has that possibility - that's a very good point - I only ever save as ASCII/text unless it's already binary ; i'll have a look at the settings/preferences on text wrangler (i'm told it's the best editor for mac and the equivalent of notepad++)
    - Vu+ Duo 2 1 x DVB-S/S2 Twin Tuner, 1 x DVB-C/T/2 Twin Hybrid Tuner, 1TB Internal HDD; Vu+ Official Qwerty remote, w/ OpenVix 4.2 & Slyk1HD V5.1 Skin by kiddac
    - Technomate 97cm Mesh Satellite Dish with Octo 8 way LNB
    - Android 5.0.1 Lollipop Smart TV Box w/ Kodi v16.1 Jarvis custom flashed for EXMP fully loaded


    FULL Picon Sets for LCD Screens and GUI - SNP includes 28.2e Satellite, Virmin Cable, 13, 23 & 19 Sat & IPTV {click here}


  17. #30
    grantdavey91's Avatar
    Title
    Forum Supporter
    Donated Member
    Join Date
    Feb 2015
    Location
    Essex UK
    Posts
    313
    Thanks
    115
    Thanked 290 Times in 111 Posts
    Quote Originally Posted by grantdavey91 View Post
    I'll have a look to see if it has that possibility - that's a very good point - I only ever save as ASCII/text unless it's already binary ; i'll have a look at the settings/preferences on text wrangler (i'm told it's the best editor for mac and the equivalent of notepad++)
    Hi, birdman

    I looked at the text wrangler preferences; I can change to different editors and download additional formats if needed ; the application itself is apparently already saving as unix ; but one thing on this i never noticed before; it has it's own built in script editor which i wasn't using for the shell; just the default text wrangler ; and it also has the function to check syntax before running commands

    Screen Shot 2016-09-19 at 17.54.39.pngScreen Shot 2016-09-19 at 17.54.03.jpgScreen Shot 2016-09-19 at 17.53.25.jpg
    - Vu+ Duo 2 1 x DVB-S/S2 Twin Tuner, 1 x DVB-C/T/2 Twin Hybrid Tuner, 1TB Internal HDD; Vu+ Official Qwerty remote, w/ OpenVix 4.2 & Slyk1HD V5.1 Skin by kiddac
    - Technomate 97cm Mesh Satellite Dish with Octo 8 way LNB
    - Android 5.0.1 Lollipop Smart TV Box w/ Kodi v16.1 Jarvis custom flashed for EXMP fully loaded


    FULL Picon Sets for LCD Screens and GUI - SNP includes 28.2e Satellite, Virmin Cable, 13, 23 & 19 Sat & IPTV {click here}


Page 2 of 4 FirstFirst 1234 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
This website uses cookies
We use cookies to store session information to facilitate remembering your login information, to allow you to save website preferences, to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners.