I don't know Nsh but if it's similar to Bash / Bourne Shell (just change the first line to test) then here's a wee example assigning variables. Asserting the input file has space separated values you test if the file exist (else just exit cleanly), cat it and use readline to set values and echo them. Assigned values exist inside the "while" loop and you can do anything with it there.
Code:
#!/bin/sh
test -f "$1" && cat "$1" | while read NAME PROFILE USERID; do
echo "$NAME $PROFILE $USERID"
done
exit 0
Code:
function shellhelp() { echo "Bash scripting guides:
http://www.tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html
http://www.tldp.org/LDP/Bash-Beginners-Guide/html/index.html
http://www.gnu.org/software/bash/manual/html_node/index.html
http://www.grymoire.com/Unix/Sh.html
http://www.tldp.org/LDP/abs/html/; }