#!/usr/bin/bash a=0; echo "oneline" > line while read var do a=1;export a; break done echo $a