Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
46 user(s) are online (39 user(s) are browsing Forums)

Members: 0
Guests: 46

more...

Support us!

Headlines

 
  Register To Post  

until it sleeps (bourne again shell)
Quite a regular
Quite a regular


See User information
There's of course established ways to do things in GNU/Linux but I'm just used to the "wait until" way... so I tinkered in bash:

#/usr/bin/bash
# wait sort of like "wait until" in AmigaDOS
typeset -i untiltime=`date +%s -d"$1"`
typeset -i rnow=`date +%s`
sleeps=`expr $untiltime - $rnow`
if [[ 
$rnow $untiltime ]] then
  
echo "No time to wait.";exit
fi
sleep $sleeps

Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )



Polls
Running AmigaOS 4 on?
AmigaOne SE/XE or microA1
Pegasos2
X5000
X1000
A1222
Sam 440/460
Classic PowerPC Amiga
WinUAE emulation
Qemu emulation
Total Votes: 211
The poll will close at 2025/12/1 12:00
6 Comments


Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project