ヤミRoot VoidGate
User / IP
:
216.73.216.49
Host / Server
:
146.88.233.70 / www.dev.loger.cm
System
:
Linux hybrid1120.fr.ns.planethoster.net 3.10.0-957.21.2.el7.x86_64 #1 SMP Wed Jun 5 14:26:44 UTC 2019 x86_64
Command
|
Upload
|
Create
Mass Deface
|
Jumping
|
Symlink
|
Reverse Shell
Ping
|
Port Scan
|
DNS Lookup
|
Whois
|
Header
|
cURL
:
/
usr
/
share
/
zsh
/
5.0.2
/
functions
/
Viewing: calendar_read
# Utility for "calendar" to read entries into the array calendar_entries. # This should be local to the caller. # The only argument is the file to read. We expect options etc. to # be correct. # # This is based on Emacs calendar syntax, which has two implications: # - Lines beginning with whitespace are continuation lines. # Hence we have to read the entire file first to determine entries. # - Lines beginning with "&" are inhibited from producing marks in # Emacs calendar window. This is irrelevant to us, so we # we simply remove leading ampersands. This is necessary since # we expect the date to start at the beginning of the line. # # TODO: Emacs has some special handling for entries where the first line # has only the date and continuation lines indicate times. Actually, # it doesn't parse the times as far as I can see, but if we want to # handle that format sensibly we would need to here. It could # be tricky to get right. local calendar=$1 line local -a lines lines=(${(f)"$(<$calendar)"}) calendar_entries=() # ignore blank lines for line in $lines; do if [[ $line = [[:space:]]* ]]; then if (( ${#calendar_entries} )); then calendar_entries[-1]+=$'\n'$line fi else calendar_entries+=(${line##\&}) fi done
Coded With 💗 by
0x6ick