Use -n option on ulimit, fix a sed command.