Bash example: setting variable #!/usr/local/bin/bash echo $(cat subjectlist) for i in `cat subjectlist` ; do echo $i; done