generate-rc.sh finished with trimming