Jump to content

Sourcing sh script skips sleep calls?


Dave-ee Jones
 Share

Recommended Posts

Hi guys,

I'm trying to source a .sh script like so:

source /root/udisk/payloads/$SWITCH_POSITION/hi.sh

And it seems to run the script, but then suddenly seems to push it to the background, as if I used '&' at the end...Or it just stops the script part way through.
At least, that's what I thought until I saw it doing the end of the script...

So if I put something like this in the hi.sh file:

LED R
sleep 1
LED M
sleep 1
LED B
sleep 1
LED C
sleep 1
LED G
sleep 1
LED Y
sleep 1
LED W

and then call it like so:

source /root/udisk/payloads/$SWITCH_POSITION/hi.sh
LED R 100

It will only show the white LED (the very last one in the script) and then start flashing red.

It seems to be skipping the sleep functions, zooming through the script...Any ideas on why this is?

Could just be me not calling the sleep function correctly...

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...