This is a new mostly bash-based implementation of a minimal and immanent AO server. No database, user accounts are created directly in the OS.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

10 lines
194 B

1 year ago
#!/bin/sh
# listPosts.sh
dir=$1
page=$2
limit=$3
offset=$(( (page - 1) * limit ))
ls -1 "$dir"/*.yaml | awk -F/ '{print $NF}' | sed 's/\.yaml$//' | tail -n "+$((offset+1))" | head -n "$limit"