Thread: EAB File Server
View Single Post
Old 30 October 2017, 12:01   #1567
old bearded fool

modrobert's Avatar
Join Date: Jan 2010
Location: Bangkok
Age: 52
Posts: 520
Originally Posted by Turran View Post
So try getting the postcount for "Turbo". You cant since the result is only "More then one user found".

We need to go through the results if its more then one, and only when it finds an exact match, report the postcount. If no exact match is found then return "user not found".

Otherwise, the user "Turbo" can never register an EAB FTP account since we can not check the postcount =)
Look at my shell script example again.


OK, here's another example, checking of exit code is "not equal" to zero.

if test $RTN -ne 0 ; then
    # user name not found or incomplete (more than one)
    echo "User not found"
    exit 1
# we have a valid user name
# do your stuff here
echo "Post count: $OUTPUT"

Last edited by modrobert; 30 October 2017 at 12:22. Reason: Added another shell script example.
modrobert is offline  
Page generated in 0.04366 seconds with 11 queries