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.
|
#!/bin/sh |
|
|
|
# usage: ./viewPost.sh --filename=<filename> |
|
|
|
# Parse the arguments |
|
for arg in "$@" |
|
do |
|
case $arg in |
|
--filename=*) |
|
file="${arg#*=}" |
|
;; |
|
esac |
|
done |
|
|
|
# Check if the file exists and is a regular file |
|
if [ -f "$file" ]; then |
|
cat "$file" |
|
else |
|
echo "File does not exist" |
|
fi
|
|
|