I am trying to find a solution to run unix shell commands in CasperJS in synchronous mode.
I have seen exec-sync for node.js, but could never make it work for casper:
Sync-exec: http://davidwalsh.name/sync-exec
I intend to run some unix utilities through casperjs:
sed -e "1,1000d" file1 > file2 -> To copy the first 1000 lines from file1 to file2
wc -l filename -> To calculate the lines
Maybe someone has experience with this.