parse bash, with javascript