Try this as Cron job to list all accounts with the name “roomxx”:
pakRad(){
echo “Cost;IP;Last;MAC;NAS;RX;TX;Time;Traffic;start;stop;room” >/tmp/log.csv
cd /Database/var/register/system/acct/entries/
for DIRNAME in `find ./r* -name MAC -printf “%h “`
do
echo ${DIRNAME} | sed -e”s/./(room..)/.*/1/”
# awk ‘FNR==1{f++}{a[f,FNR]=$1}END{for(x=1;x<=FNR;x++){for(y=1;y>/tmp/log.csv
awk ‘FNR==1{f++}{a[f,FNR]=$1}END{for(x=1;x<=FNR;x++){for(y=1;y>/tmp/log.csv
echo ${DIRNAME} | sed -e”s/./(room..)/.*/1/” >>/tmp/log.csv
done
ftp yourFtpServer.xx<
ftpUser
ftpPassword
put /tmp/log.csv ./log.csv
quit
EOF
rm -f /tmp/log.csv
}
pakRad